Problem overriding ports with portshaker.

George Hartzell hartzell at alerce.com
Mon Sep 23 18:24:56 UTC 2019


George Hartzell writes:
 > 
 > I've been happily using portshaker to merge my "personal" ports tree
 > [1] with the standard tree, then building things with poudriere.  Up
 > until today the things in my tree were additions.
 > 
 > Today I tried replacing the standard copy of audio/logitechmusicserver
 > with a customized version that includes my SSL patch [2] and I suspect
 > I'll also need something like the Perl 5.30 patch [3].  I'm getting a
 > confusing error when I try to merge the trees:
 > 
 > ```
 > hartzell at corvid:/usr/portshaker/github_hartzell_freebsd-ports/audio % sudo portshaker -M
 > make: "/usr/share/mk/bsd.port.mk" line 32: Cannot open /usr/ports/Mk/bsd.port.mk
 > make: "/usr/portshaker/github_hartzell_freebsd-ports/audio/logitechmediaserver/Makefile" line 87: Malformed conditional (${ARCH} == "i386")
 > make: "/usr/portshaker/github_hartzell_freebsd-ports/audio/logitechmediaserver/Makefile" line 94: Malformed conditional (${ARCH} == "amd64")
 > make: "/usr/share/mk/bsd.port.mk" line 32: Cannot open /usr/ports/Mk/bsd.port.mk
 > make: Fatal errors encountered -- cannot continue[: make: stopped in /usr/portshaker/github_hartzell_freebsd-ports/audio/logitechmediaserver: bad number
 > make: "/usr/share/mk/bsd.port.mk" line 32: Cannot open /usr/ports/Mk/bsd.port.mk
 > make: "/usr/portshaker/github_hartzell_freebsd-ports/audio/logitechmediaserver/Makefile" line 87: Malformed conditional (${ARCH} == "i386")
 > make: "/usr/portshaker/github_hartzell_freebsd-ports/audio/logitechmediaserver/Makefile" line 94: Malformed conditional (${ARCH} == "amd64")
 > make: "/usr/share/mk/bsd.port.mk" line 32: Cannot open /usr/ports/Mk/bsd.port.mk
 > make: Fatal errors encountered -- cannot continue[: make: stopped in /usr/portshaker/github_hartzell_freebsd-ports/audio/logitechmediaserver: bad number
 > [: make: stopped in /usr/portshaker/github_hartzell_freebsd-ports/audio/logitechmediaserver: bad number
 > hartzell at corvid:/usr/portshaker/github_hartzell_freebsd-ports/audio %
 > ```
 > 
 > Interestingly, adding `PORTREVISION= 1` to my copy of the port gives a
 > shorter version of the same error message:
 > 
 > ```
 > hartzell at corvid:/usr/portshaker/github_hartzell_freebsd-ports/audio % sudo portshaker -M
 > make: "/usr/share/mk/bsd.port.mk" line 32: Cannot open /usr/ports/Mk/bsd.port.mk
 > make: "/usr/portshaker/github_hartzell_freebsd-ports/audio/logitechmediaserver/Makefile" line 88: Malformed conditional (${ARCH} == "i386")
 > make: "/usr/portshaker/github_hartzell_freebsd-ports/audio/logitechmediaserver/Makefile" line 95: Malformed conditional (${ARCH} == "amd64")
 > make: "/usr/share/mk/bsd.port.mk" line 32: Cannot open /usr/ports/Mk/bsd.port.mk
 > make: Fatal errors encountered -- cannot continue[: make: stopped in /usr/portshaker/github_hartzell_freebsd-ports/audio/logitechmediaserver: bad number
 > hartzell at corvid:/usr/portshaker/github_hartzell_freebsd-ports/audio %
 > ```
 > 
 > Everything works fine if I rename my customized port to
 > e.g. `gh-logitechmusicserver`, but I thought that one of the goals of
 > portshaker was to override local ports.
 > 
 > I can live with just giving my port a custom name, but I'd like to
 > understand where my disconnect is (am I doing it wrong, or
 > misunderstanding something, or ...).
 > 
 > Thanks for any insights,

Answering my own question, the issue seems to be that I didn't have
/usr/ports populated.  Since I'm doing all of my builds and etc via
poudriere I have no need of wasting the disk space, but populating it
via portsnap has "fixed" the problem.

g.


More information about the freebsd-ports mailing list