diff options
author | dougb <dougb@FreeBSD.org> | 2006-05-29 10:12:31 +0000 |
---|---|---|
committer | dougb <dougb@FreeBSD.org> | 2006-05-29 10:12:31 +0000 |
commit | 6646597c24a09cdf55271289f39a26991f491783 (patch) | |
tree | 62028dee0d283baabc49ecad95f710076d87c1cc /sysutils/portmaster | |
parent | 3136e6010589d9f5e38f4257e860a1fdb2b2ae5e (diff) | |
download | FreeBSD-ports-6646597c24a09cdf55271289f39a26991f491783.zip FreeBSD-ports-6646597c24a09cdf55271289f39a26991f491783.tar.gz |
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
Diffstat (limited to 'sysutils/portmaster')
-rw-r--r-- | sysutils/portmaster/Makefile | 2 | ||||
-rw-r--r-- | sysutils/portmaster/files/portmaster.sh.in | 23 |
2 files changed, 19 insertions, 6 deletions
diff --git a/sysutils/portmaster/Makefile b/sysutils/portmaster/Makefile index 017aa08..95ca75e 100644 --- a/sysutils/portmaster/Makefile +++ b/sysutils/portmaster/Makefile @@ -8,7 +8,7 @@ # PORTNAME= portmaster -PORTVERSION= 1.2 +PORTVERSION= 1.3 CATEGORIES= sysutils MASTER_SITES= # none DISTFILES= # none diff --git a/sysutils/portmaster/files/portmaster.sh.in b/sysutils/portmaster/files/portmaster.sh.in index d0baa17..4fb6f39 100644 --- a/sysutils/portmaster/files/portmaster.sh.in +++ b/sysutils/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 |