portmaster did not replace port

Doug Barton dougb at FreeBSD.org
Fri Feb 22 22:47:57 UTC 2008


Miroslav Lachman wrote:
> Hi,
> 
> I am trying to use portmaster to replace installed GnuPG 2 with GnuPG 1.
> portmaster -o security/gnupg1 gnupg-2.0.4
> 
> But it always ends with gnupg-2.0.4 re-installed again, so now I have
> both versions installed. Is it possible to use portmaster for this task?

It certainly should be. :) I made a last-minute optimization in the
"detect which port we're working on" code and while I special-cased
the -o code in one place, I forgot to do it in the other, resulting in
the behavior you're seeing. The attached patch should fix this up for
you, I've tested it specifically with gnupg going from 2->1 and back
again.

Please let me know if this works for you, and I'll be committing a new
version with this patch pretty much right away.

Doug

-- 

    This .signature sanitized for your protection

-------------- next part --------------
--- portmaster	2008/01/30 01:40:33	2.24
+++ portmaster	2008/02/22 22:35:17
@@ -1769,7 +1769,7 @@
 	fi
 fi
 
-if [ -n "$upg_port" ]; then
+if [ -n "$upg_port" -a -z "$REPLACE_ORIGIN" ]; then
 	portdir=`origin_from_pdb $upg_port`
 	[ -n "$portdir" ] || fail "No ORIGIN in $pdb/$upg_port/+CONTENTS"
 elif [ -z "$portdir" ]; then


More information about the freebsd-ports mailing list