summaryrefslogtreecommitdiff
path: root/mk/install
diff options
context:
space:
mode:
authorseb <seb>2003-06-25 20:51:25 +0000
committerseb <seb>2003-06-25 20:51:25 +0000
commitbf7882332600988c278f7d16eea6b10b0f0e2c00 (patch)
treee00dcab6df57e660815cedf31184d445530a43bf /mk/install
parentc5e6fd49eff1e7c41688f423bf762e32ee760e94 (diff)
downloadpkgsrc-bf7882332600988c278f7d16eea6b10b0f0e2c00.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/install')
-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