symlinked ports directory -> problem to resolve dependencies in portmaster

Stefan Esser se at freebsd.org
Tue Nov 18 18:31:12 UTC 2014


Am 16.11.2014 um 07:26 schrieb Alexander Leidinger:
> Hi,
> 
> my /usr/ports directory is a symlink to /space/system/usr_ports, when I
> try now to update a port with portmaster, it fails when it tries to
> follow dependencies.
> 
> Example:
> ---snip---
> # portmaster webcamd-
> ===>>> Package installation support cannot be used with pkgng yet,
>        it will be disabled
> 
> 
> ===>>> Currently installed version: webcamd-3.17.0.6
> ===>>> Port directory: /usr/ports/multimedia/webcamd
> 
> ===>>> Launching 'make checksum' for multimedia/webcamd in background
> ===>>> Gathering dependency list for multimedia/webcamd from ports
> ===>>> Launching child to install /space/system/usr_ports/devel/pkgconf
> 
> ===>>> webcamd-3.17.0.6 >> /space/system/usr_ports/devel/pkgconf (1/1)
> 
> ===>>> No valid installed port, or port directory given
> ===>>> Try portmaster --help
> 
> 
> ===>>> Update for /space/system/usr_ports/devel/pkgconf failed
> ===>>> Aborting update
> 
> # realpath /usr/ports/devel/pkgconf
> /space/system/usr_ports/devel/pkgconf
> 
> # make -C /usr/ports -V PORTSDIR
> /space/system/usr_ports
> 
> # grep PORTSDIR /etc/make.conf
> 
> ---snip---
> 
> I can't find an entry in UPDATING which looks related. Any ideas what's
> wrong here?

Hi Alexander,

there was a change to the .mk files which requires the attached patch to
portmaster (repeated inline, but probably with mangled white-space):

--- portmaster~
+++ portmaster
@@ -359,7 +359,7 @@
 if [ "$$" -eq "$PM_PARENT_PID" ]; then
        if [ -z "$pd" ]; then
                if [ -z "$PORTSDIR" ]; then
-                       [ -d /usr/ports ] && pd=/usr/ports
+                       [ -d /usr/ports ] && pd=`realpath /usr/ports`
                        [ -z "$pd" ] &&
                                pd=`pm_make_b
-f/usr/share/mk/bsd.port.mk -V PORTSDIR 2>/dev/null`
                else

I always wanted to create a PR that mentions that patch, but forgot
about it and was just reminded by you ;-)

Best regards, STefan
-------------- next part --------------
--- portmaster~
+++ portmaster
@@ -359,7 +359,7 @@
 if [ "$$" -eq "$PM_PARENT_PID" ]; then
 	if [ -z "$pd" ]; then
 		if [ -z "$PORTSDIR" ]; then
-			[ -d /usr/ports ] && pd=/usr/ports
+			[ -d /usr/ports ] && pd=`realpath /usr/ports`
 			[ -z "$pd" ] &&
 				pd=`pm_make_b -f/usr/share/mk/bsd.port.mk -V PORTSDIR 2>/dev/null`
 		else


More information about the freebsd-ports mailing list