pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/install Try to deal with empty or "corrupted" Info ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/130f97bd62ef
branches:  trunk
changeset: 460149:130f97bd62ef
user:      seb <seb%pkgsrc.org@localhost>
date:      Fri Aug 22 18:17:03 2003 +0000

description:
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:

 mk/install/install-info |  7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diffs (17 lines):

diff -r 4faca02f3ad1 -r 130f97bd62ef mk/install/install-info
--- a/mk/install/install-info   Fri Aug 22 16:14:17 2003 +0000
+++ b/mk/install/install-info   Fri Aug 22 18:17:03 2003 +0000
@@ -9,6 +9,13 @@
 
 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



Home | Main Index | Thread Index | Old Index