summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorseb <seb@pkgsrc.org>2003-06-25 20:51:25 +0000
committerseb <seb@pkgsrc.org>2003-06-25 20:51:25 +0000
commit082b66be008577c1ff2c7e63102cb4a332b062dd (patch)
treee00dcab6df57e660815cedf31184d445530a43bf /mk
parent30001d152f07d64fc1ee11e31f302bb787886e73 (diff)
downloadpkgsrc-082b66be008577c1ff2c7e63102cb4a332b062dd.tar.gz
At DEINSTALL time after un-registering info files from the Info
directory file remove it if it is empty i.e. if it contains only one menu/entry line i.e. only one line starting with '*'. This allow INFO_DIR to be set to a package specific directory while not registering in the PLIST the Info directory file (${INFOR_DIR}/dir). Registering such an Info directory file in the PLIST is not really possible as a md5 signature of it holding the registered info entries would be stored in PKG_DBDIR. At deinstall time this signature would not be matched because the DEINSTALL script would have modified it by un-registering the info files from it. Hence the package removal would be reported as incomplete... You are probably right if this looks like a hack to you...
Diffstat (limited to 'mk')
-rw-r--r--mk/install/install-info4
1 files changed, 4 insertions, 0 deletions
diff --git a/mk/install/install-info b/mk/install/install-info
index b55194c76a4..10855a60897 100644
--- a/mk/install/install-info
+++ b/mk/install/install-info
@@ -21,5 +21,9 @@ DEINSTALL)
${INSTALL_INFO} --delete --info-dir=${PKG_PREFIX}/${INFO_DIR} \
${PKG_PREFIX}/${INFO_DIR}/${f} 1>/dev/null 2>&1
done
+ _nentries="`${GREP} -c '^\*' ${PKG_PREFIX}/${INFO_DIR}/dir`"
+ if [ "${_nentries}" -le 1 ]; then
+ ${RM} ${PKG_PREFIX}/${INFO_DIR}/dir
+ fi
;;
esac