summaryrefslogtreecommitdiff
path: root/ports-mgmt/portmaster
diff options
context:
space:
mode:
authorDoug Barton <dougb@FreeBSD.org>2006-05-29 10:12:31 +0000
committerDoug Barton <dougb@FreeBSD.org>2006-05-29 10:12:31 +0000
commitb1c2ec1745d82e99c73d06144bd8d7b150d3534d (patch)
tree04f9de3adf16a9cc72b7622ed442f59cc74f813a /ports-mgmt/portmaster
parentUpdate to 1.28. (diff)
Vastly improve handling of moved ports:
1. Update DEPORIGIN in addition to @pkgdep entries in +CONTENTS 2. Give more details about why a port moved 3. grep for the old port name in existing +CONTENTS files, since the new name will not appear at all Also, stretch the window to wait for a background 'make checksum' to complete to 5 seconds instead of 3
Notes
Notes: svn path=/head/; revision=163820
Diffstat (limited to 'ports-mgmt/portmaster')
-rw-r--r--ports-mgmt/portmaster/Makefile2
-rw-r--r--ports-mgmt/portmaster/files/portmaster.sh.in23
2 files changed, 19 insertions, 6 deletions
diff --git a/ports-mgmt/portmaster/Makefile b/ports-mgmt/portmaster/Makefile
index 017aa0858c5c..95ca75ee3951 100644
--- a/ports-mgmt/portmaster/Makefile
+++ b/ports-mgmt/portmaster/Makefile
@@ -8,7 +8,7 @@
#
PORTNAME= portmaster
-PORTVERSION= 1.2
+PORTVERSION= 1.3
CATEGORIES= sysutils
MASTER_SITES= # none
DISTFILES= # none
diff --git a/ports-mgmt/portmaster/files/portmaster.sh.in b/ports-mgmt/portmaster/files/portmaster.sh.in
index d0baa17bd3eb..4fb6f3908681 100644
--- a/ports-mgmt/portmaster/files/portmaster.sh.in
+++ b/ports-mgmt/portmaster/files/portmaster.sh.in
@@ -1,6 +1,6 @@
#!/bin/sh
-# Local version: 1.63
+# Local version: 1.65
# $FreeBSD$
# Copyright (c) 2005-2006 Douglas Barton, All rights reserved
@@ -61,9 +61,17 @@ update_contents () {
local tempfile
tempfile=`mktemp -t tempfile-${new_port}`
+
sed "s/@pkgdep $1/@pkgdep $2/" $dep_port_contents > $tempfile &&
mv $tempfile $pdb/$dep_port/+CONTENTS
chmod 644 $pdb/$dep_port/+CONTENTS
+
+ if [ -n "$oldportdir" ]; then
+ sed "s%N:${oldportdir}\$%N:${newportdir}%" $dep_port_contents > $tempfile &&
+ mv $tempfile $pdb/$dep_port/+CONTENTS
+ chmod 644 $pdb/$dep_port/+CONTENTS
+
+ fi
}
dep_warn () {
@@ -196,7 +204,7 @@ check_for_updates () {
}
find_moved_port () {
- # newportdir is used globally
+ # newportdir and oldportdir are used globally
local m
newportdir=`sed -ne "s#^${1}|\([^|]*\)|.*#\1#p" $pd/MOVED`
@@ -213,9 +221,14 @@ find_moved_port () {
fi
fi
+ m=`sed -ne "s#^${1}|.*|.*|\(.*\)#\1#p" $pd/MOVED`
+ oldportdir=$1
# Just in case there was more than one match, use the last one
newportdir=`echo $newportdir | sed 's/.* //'`
- echo "===>>> The $1 port has moved to $pd/$newportdir"
+ echo ''
+ echo "===>>> The $1 port has moved to $newportdir"
+ echo "===>>> Reason: $m"
+ echo ''
return 0
}
@@ -611,7 +624,7 @@ while [ -f "$fetchlog" ]; do
tail -10 $fetchlog | grep -v '^$'
echo ''
echo "===>>> Waiting on fetch to complete for $portdir <<<==="
- sleep 3
+ sleep 5
done
make $MAKE_ARGS || fail "make failed for $portdir"
@@ -624,7 +637,7 @@ short_port="${prefix}${portname}${suffix}"
# Check for dependencies here in case +REQUIRED_BY is not up to date or missing
grep_deps=`mktemp -t grep-deps-${short_port}`
-grep -l "pkgdep ${short_port}-" $pdb/*/+CONTENTS | cut -f 5 -d '/' |
+grep -l "pkgdep ${upg_port%-*}-" $pdb/*/+CONTENTS | cut -f 5 -d '/' |
sort -u > $grep_deps
if [ -s "$pdb/$upg_port/+REQUIRED_BY" ]; then