From 88611448150ddd082d9ff250331b694bd9de6130 Mon Sep 17 00:00:00 2001 From: Mamoru Sakaue / MwGhennndo Date: Mon, 28 Jan 2013 02:24:36 +0900 Subject: [PATCH] A bug that unused distfiles were not deleted is fixed. modified: portsreinstall --- portsreinstall | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/portsreinstall b/portsreinstall index 41ac3fc..85773d7 100755 --- a/portsreinstall +++ b/portsreinstall @@ -10,7 +10,7 @@ # ================================================ APPNAME=`basename "$0"` -MYVERSION=2.2.2+toward_2.2.3_20130127213145 +MYVERSION=2.2.2+toward_2.2.3_20130128022414 PREFIX=${PREFIX:-/usr/local} CONFFILE=${PREFIX}/etc/${APPNAME}.conf @@ -2850,8 +2850,9 @@ then echo "Starting to clean up obsolete or unused distfiles at `timestamp`" ( set -e; cd "${DISTDIR}" && find . -type f ) | grep -v -E -f "${DBDIR}/distfiles.grep.pattern" | while read distfile do - echo " $distfile" - rm -f "$distfile" + echo -n ' ' + expr "$distfile" : '^\./\(.*\)' + rm -f "${DISTDIR}/$distfile" done touch "${DBDIR}/COMPLETE_CLEANUP_OBSLETE_DISTFILES" echo @@ -2873,11 +2874,28 @@ fi touch "${DBDIR}/failed.list" if [ `cat "${DBDIR}/failed.list" | wc -l` -gt 0 ] then + command_pkg_updating= + if [ "x$WITH_PKGNG" = xyes ] + then + if which -s pkg_updating + then + command_pkg_updating='pkg-updating(8) or pkg_updating(1)' + else + command_pkg_updating='pkg-updating(8)' + fi + elif which -s pkg_updating + then + command_pkg_updating='pkg_updating(1)' + fi fold -s << eof *** (Re)installation of the following ports were unsuccessful. Please recover them manually. You are recommended to read ${PORTSDIR}/UPDATING to resolve the problems. -If you have installed ports-mgmt/portupgrade or ports-mgmt/portupgrade-devel, pkg_updating(1) will be useful for this purpose. +eof + [ -n "$command_pkg_updating" ] && fold -s << eof + $command_pkg_updating will be useful for this purpose. +eof + fold -s << eof You can check whether the failed ports are already unnecessary by executing ${APPNAME} show dependents [failed_port_globs] For unnecessary failed ports, you can delete it by -- 2.11.0