summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorcperciva <cperciva@FreeBSD.org>2013-07-11 22:19:18 +0000
committercperciva <cperciva@FreeBSD.org>2013-07-11 22:19:18 +0000
commit7d9a4be39ec0ff9260a5edfd1c95c06f5f52ade1 (patch)
tree83c3cc4dd49822a7c20cc301f6317e494143431e /usr.sbin
parentff1a2e73b17e3f6b7324510b60ab7d1f8586f878 (diff)
downloadFreeBSD-src-7d9a4be39ec0ff9260a5edfd1c95c06f5f52ade1.zip
FreeBSD-src-7d9a4be39ec0ff9260a5edfd1c95c06f5f52ade1.tar.gz
Fix bug in deleting files: If two ports had the same tarball and one of
them changed (or was removed from the tree) then portsnap would delete that file. This happened earlier today when one of two empty port directories was removed. Uniquifying the lists of needed files fixes this. 9.2-RELEASE candidate. MFC after: 3 days
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/portsnap/portsnap/portsnap.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/portsnap/portsnap/portsnap.sh b/usr.sbin/portsnap/portsnap/portsnap.sh
index 5826fa1..14e5441 100644
--- a/usr.sbin/portsnap/portsnap/portsnap.sh
+++ b/usr.sbin/portsnap/portsnap/portsnap.sh
@@ -864,8 +864,8 @@ fetch_update() {
echo "done."
# Remove files which are no longer needed
- cut -f 2 -d '|' tINDEX INDEX | sort > oldfiles
- cut -f 2 -d '|' tINDEX.new INDEX.new | sort | comm -13 - oldfiles |
+ cut -f 2 -d '|' tINDEX INDEX | sort -u > oldfiles
+ cut -f 2 -d '|' tINDEX.new INDEX.new | sort -u | comm -13 - oldfiles |
lam -s "files/" - -s ".gz" | xargs rm -f
rm patchlist filelist oldfiles
OpenPOWER on IntegriCloud