summaryrefslogtreecommitdiff
path: root/mk/install
diff options
context:
space:
mode:
authorseb <seb@pkgsrc.org>2003-08-22 18:17:03 +0000
committerseb <seb@pkgsrc.org>2003-08-22 18:17:03 +0000
commit783b9f53bab4e8bb39bcb8e9245257d0a6e62567 (patch)
tree7fd4a56d4b11d5b03033990dbc92e9d41899fe81 /mk/install
parentc0104fc17ed99c48a91fcdb02438abe0c4b28b15 (diff)
downloadpkgsrc-783b9f53bab4e8bb39bcb8e9245257d0a6e62567.tar.gz
Try to deal with empty or "corrupted" Info directory file: if the
file exist when installing a package and it does not contain at least one line starting with '*' then remove it and let install-info create a new one. This should address PR pkg/22555 from reed@.
Diffstat (limited to 'mk/install')
-rw-r--r--mk/install/install-info7
1 files changed, 7 insertions, 0 deletions
diff --git a/mk/install/install-info b/mk/install/install-info
index 3c505e54144..dca9f475bf1 100644
--- a/mk/install/install-info
+++ b/mk/install/install-info
@@ -9,6 +9,13 @@ INFO_DIR="@INFO_DIR@"
case ${STAGE} in
POST-INSTALL)
+ if [ -f ${PKG_PREFIX}/${INFO_DIR}/dir ]; then
+ _nentries="`${GREP} -c '^\*' ${PKG_PREFIX}/${INFO_DIR}/dir 2>/dev/null`"
+ if [ x"${_nentries}" != x -a "${_nentries}" -lt 1 ]; then
+ ${RM} ${PKG_PREFIX}/${INFO_DIR}/dir
+ fi
+
+ fi
for f in ${INFO_FILES}; do
${INSTALL_INFO} --delete --info-dir=${PKG_PREFIX}/${INFO_DIR} \
${PKG_PREFIX}/${INFO_DIR}/${f} 1>/dev/null 2>&1