Bug 237061 - port-mgmt/portmaster: Portmaster behaviour may depend on what is in the current working directory
Summary: port-mgmt/portmaster: Portmaster behaviour may depend on what is in the curre...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Stefan Eßer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-06 14:25 UTC by Philippe Michel
Modified: 2020-01-26 19:00 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 Philippe Michel 2019-04-06 14:25:28 UTC
Starting portmaster in /sys/conf (by chance, the shell where I ran it had been changed to this directory for an earlier task) causes the following error :

# portmaster openjpeg

===>>> The ports directory (
make: stopped in /usr/src/sys/conf) does not seem to contain a ports tree
===>>> Aborting update

Apparently portmaster looks for some files in some places, with $cwd early in the directories search list and /sys/conf contains an homonym.
Comment 1 Walter Schwarzenfeld freebsd_triage 2019-08-24 08:30:02 UTC
/usr/local/sbin/portmaster:

358  +       if [ "$PWD" = "/usr/src/sys/conf" ]; then
359  +               pm_cd $HOME
360  +      fi
Comment 2 commit-hook freebsd_committer freebsd_triage 2020-01-26 19:00:24 UTC
A commit references this bug:

Author: se
Date: Sun Jan 26 19:00:18 UTC 2020
New revision: 524228
URL: https://svnweb.freebsd.org/changeset/ports/524228

Log:
  Make portmaster fall back to other locations if invoked in, e.g., /sys/conf.

  PR:		237061
  Approved by:	antoine (implicit)

Changes:
  head/ports-mgmt/portmaster/Makefile
  head/ports-mgmt/portmaster/files/patch-portmaster