Bug 194722 - ports-mgmt/portmaster fails to parse dependencies
Summary: ports-mgmt/portmaster fails to parse dependencies
Status: Closed Unable to Reproduce
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Torsten Zühlsdorff
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-31 20:26 UTC by Martin Birgmeier
Modified: 2016-02-11 10:56 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Birgmeier 2014-10-31 20:26:37 UTC
On HEAD, portmaster fails to parse dependencies. Example (/usr/ports is a symlink to /.../hal/z/SRC/FreeBSD-ports/head (and yes, the first component of the directory is indeed "...")):

--- snip ---
# portmaster -g lzo2-2.08_1 

===>>> Currently installed version: lzo2-2.08_1
===>>> Port directory: /usr/ports/archivers/lzo2

===>>> Launching 'make checksum' for archivers/lzo2 in background
===>>> Gathering dependency list for archivers/lzo2 from ports
===>>> Launching child to install /.../hal/z/SRC/FreeBSD-ports/head/ports-mgmt/pkg

===>>> lzo2-2.08_1 >> /.../hal/z/SRC/FreeBSD-ports/head/ports-mgmt/pkg (1/1)

===>>> No valid installed port, or port directory given
===>>> Try portmaster --help


===>>> Update for /.../hal/z/SRC/FreeBSD-ports/head/ports-mgmt/pkg failed
===>>> Aborting update

# 
--- snip ---

The reason is commit r272282 in the FreeBSD sources:

--- snip ---
r272282 | will | 2014-09-29 17:05:23 +0200 (Mon, 29 Sep 2014) | 17 lines
Changed paths:
   M /head/share/mk/bsd.port.mk
   M /head/share/mk/bsd.port.subdir.mk

Search for the nearest PORTSDIR where Mk/bsd.ports.mk exists, from .CURDIR.
This will only take effect if PORTSDIR is not set, as previously supported.

Use .if exists(), for four specific possibilities relative to .CURDIR:
., .., ../.., and ../../..  The fourth possibility is primarily in case
ports ever grows a third level.  If none of these paths exist, fall back to
the old default of /usr/ports.

This removes the need to set PORTSDIR explicitly (or via wrapper script) if
one is running out of a ports tree that is not in /usr/ports, but in a
home directory.

Reviewed by:    bapt, bdrewery (older version)
CR:             D799
MFC after:      1 week
Sponsored by:   Spectra Logic
--- snip ---

A workaround is setting PORTSDIR=/usr/ports explicitly on make's command line.
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2014-10-31 20:26:37 UTC
Maintainers CC'd
Comment 2 John Marino freebsd_committer freebsd_triage 2014-10-31 20:59:36 UTC
hmmm, the auto-assigner misidentified this PR.

(hint to submitter: put <category>/<portname> in title so the auto-assigner doesn't have to guess)
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2015-04-25 16:10:11 UTC
Assignee is no longer the maintainer.
Comment 4 w.schwarzenfeld 2016-02-09 00:22:17 UTC
portmaster lzo2
Password:

===>>> Currently installed version: lzo2-2.09
===>>> Port directory: /usr/ports/archivers/lzo2

===>>> Gathering distinfo list for installed ports

===>>> Launching 'make checksum' for archivers/lzo2 in background
===>>> Gathering dependency list for archivers/lzo2 from ports
===>>> Initial dependency check complete for archivers/lzo2


===>>> Starting build for archivers/lzo2 <<<===
....


These seems to work or fixed.
Comment 5 John Marino freebsd_committer freebsd_triage 2016-02-10 18:47:20 UTC
PM has a new maintainer, reassign PR.
Comment 6 Torsten Zühlsdorff 2016-02-11 10:56:52 UTC
I close this PR because i am not able to reproduce the problem. The PR originated in 2014 so it is very likely that the problem was fixed in the meantime.

I took the following steps in a clean jail:
# svnlite checkout -r370837 svn://svn.freebsd.org/ports/head /usr/ports/ 
# cd /usr/ports/archivers/lzo2/ && make install

# svnlite update /usr/ports
# cd /usr/ports/ports-mgmt/portmaster && make install

#  portmaster -g lzo2-2.08_1 

===>>> Currently installed version: lzo2-2.08_1
===>>> Port directory: /usr/ports/archivers/lzo2

===>>> Gathering distinfo list for installed ports

===>>> Launching 'make checksum' for archivers/lzo2 in background
===>>> Gathering dependency list for archivers/lzo2 from ports
===>>> Launching child to update pkg-1.6.3 to pkg-1.6.4

===>>> lzo2-2.08_1 >> pkg-1.6.3 (1/1)

===>>> Currently installed version: pkg-1.6.3
===>>> Port directory: /usr/ports/ports-mgmt/pkg

===>>> Launching 'make checksum' for ports-mgmt/pkg in background
===>>> Gathering dependency list for ports-mgmt/pkg from ports
===>>> No dependencies for ports-mgmt/pkg

===>>> Continuing initial dependency check for archivers/lzo2
===>>> Initial dependency check complete for archivers/lzo2


===>>> lzo2-2.08_1 >> (1)

===>>> The following actions will be taken if you choose to proceed:
        Upgrade lzo2-2.08_1 to lzo2-2.09
        Upgrade pkg-1.6.3 to pkg-1.6.4

[..]

===>>> The following actions were performed:
        Upgrade of pkg-1.6.3 to pkg-1.6.4
        Upgrade of lzo2-2.08_1 to lzo2-2.09


So the update performs now correctly.