diff options
author | Bryan Drewery <bryan@shatow.net> | 2020-05-02 03:13:34 +0300 |
---|---|---|
committer | Bryan Drewery <bryan@shatow.net> | 2020-05-04 21:37:35 +0300 |
commit | c62a9e1f3ceb62aad8847dfb6fdcf2f6607f291e (patch) | |
tree | bb76bda1570897b89b86206eb18339f6433fb670 | |
parent | b21b71c6cffc02fbd3b59b396bdb06243740fa26 (diff) |
Drop legacy support for pre-check_leftovers.sh
-rwxr-xr-x | src/share/poudriere/common.sh | 93 |
1 files changed, 5 insertions, 88 deletions
diff --git a/src/share/poudriere/common.sh b/src/share/poudriere/common.sh index 3a966bf3..7d145e86 100755 --- a/src/share/poudriere/common.sh +++ b/src/share/poudriere/common.sh @@ -3408,7 +3408,11 @@ build_port() { bset_job_status "leftovers" "${originspec}" \ "${pkgname}" - if [ -f "${mnt}${PORTSDIR}/Mk/Scripts/check_leftovers.sh" ]; then + if [ ! -f "${mnt}${PORTSDIR}/Mk/Scripts/check_leftovers.sh" ]; then + msg "Obsolete ports tree is missing /usr/ports/Mk/Scripts/check_leftovers.sh" + testfailure=2 + touch "${add}" "${del}" "${mod}" || : + else check_leftovers ${mnt} | sed -e "s|${mnt}||" | injail /usr/bin/env PORTSDIR=${PORTSDIR} \ ${PORT_FLAGS} /bin/sh \ @@ -3421,93 +3425,6 @@ build_port() { M) echo "${data}" >> ${mod} ;; esac done - else - # LEGACY - Support for older ports tree. - local users user homedirs plistsub_sed - plistsub_sed=$(injail /usr/bin/env ${PORT_FLAGS} /usr/bin/make -C ${portdir} -V'PLIST_SUB:C/"//g:NLIB32*:NPERL_*:NPREFIX*:N*="":N*="@comment*:C/(.*)=(.*)/-es!\2!%%\1%%!g/') - - users=$(injail /usr/bin/make -C ${portdir} -VUSERS) - homedirs="" - for user in ${users}; do - user=$(grep ^${user}: ${mnt}${PORTSDIR}/UIDs | cut -f 9 -d : | sed -e "s|/usr/local|${PREFIX}| ; s|^|${mnt}|") - homedirs="${homedirs} ${user}" - done - - check_leftovers ${mnt} | \ - while read modtype path extra; do - local ppath ignore_path=0 - - # If this is a directory, use @dirrm in output - if [ -d "${path}" ]; then - ppath="@dirrm "`echo $path | sed \ - -e "s,^${mnt},," \ - -e "s,^${PREFIX}/,," \ - ${plistsub_sed} \ - ` - else - ppath=`echo "$path" | sed \ - -e "s,^${mnt},," \ - -e "s,^${PREFIX}/,," \ - ${plistsub_sed} \ - ` - fi - case $modtype in - +) - if [ -d "${path}" ]; then - # home directory of users created - case " ${homedirs} " in - *\ ${path}\ *) continue;; - *\ ${path}/*\ *) continue;; - esac - fi - case "${ppath}" in - # gconftool-2 --makefile-uninstall-rule is unpredictable - etc/gconf/gconf.xml.defaults/%gconf-tree*.xml) ;; - # fc-cache - skip for now - /var/db/fontconfig/*) ;; - *) echo "${ppath}" >> ${add} ;; - esac - ;; - -) - # Skip if it is PREFIX and non-LOCALBASE. See misc/kdehier4 - # or mail/qmail for examples - [ "${path#${mnt}}" = "${PREFIX}" -a \ - "${LOCALBASE}" != "${PREFIX}" ] && ignore_path=1 - - # fc-cache - skip for now - case "${ppath}" in - /var/db/fontconfig/*) ignore_path=1 ;; - esac - - if [ $ignore_path -eq 0 ]; then - echo "${ppath}" >> ${del} - fi - ;; - M) - case "${ppath}" in - # gconftool-2 --makefile-uninstall-rule is unpredictable - etc/gconf/gconf.xml.defaults/%gconf-tree*.xml) ;; - # This is a cache file for gio modules could be modified for any gio modules - lib/gio/modules/giomodule.cache) ;; - # removal of info files leaves entry uneasy to cleanup in info/dir - # accept a modification of this file - info/dir) ;; - */info/dir) ;; - # The is pear database cache - %%PEARDIR%%/.depdb|%%PEARDIR%%/.filemap) ;; - #ls-R files from texmf are often regenerated - */ls-R);; - # Octave packages database, blank lines can be inserted between pre-install and post-deinstall - share/octave/octave_packages) ;; - # xmlcatmgr is constantly updating catalog.ports ignore modification to that file - share/xml/catalog.ports);; - # fc-cache - skip for now - /var/db/fontconfig/*) ;; - *) echo "${ppath#@dirrm } ${extra}" >> ${mod} ;; - esac - ;; - esac - done fi sort ${add} > ${add1} |