ports/146858: [patch] ports-mgmt/portupgrade-devel: respect LOCALBASE
Anonymous
swell.k at gmail.com
Sun May 23 08:50:02 UTC 2010
>Number: 146858
>Category: ports
>Synopsis: [patch] ports-mgmt/portupgrade-devel: respect LOCALBASE
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sun May 23 08:50:01 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Anonymous
>Release: FreeBSD 9.0-CURRENT amd64
>Organization:
>Environment:
LOCALBASE=/usr/pkg
>Description:
The port uses bogus name PREFIX, hardcodes it to /usr/local and uses it
to find its tools.
>How-To-Repeat:
# portupgrade -a
[Updating the pkgdb <format:dbm_hash> in /var/db/pkg ... - 303 packages found (-1 +1) (...). done]
Command failed [exit code 127]: /usr/local/sbin/pkgdb -aFOQ
>Fix:
Here is a *workaround* that only tries to read LOCALBASE defined in
environ(7) and ignores make.conf(5).
--- a.diff begins here ---
Index: ports-mgmt/portupgrade-devel/Makefile
===================================================================
RCS file: /a/.cvsup/ports/ports-mgmt/portupgrade-devel/Makefile,v
retrieving revision 1.267
diff -u -p -r1.267 Makefile
--- ports-mgmt/portupgrade-devel/Makefile 22 Dec 2009 03:28:40 -0000 1.267
+++ ports-mgmt/portupgrade-devel/Makefile 23 May 2010 08:24:45 -0000
@@ -83,6 +83,10 @@ pre-extract:
@exit 1
.endif
+post-patch: .SILENT
+ ${REINPLACE_CMD} '/PREFIX/s:\(=[[:space:]]*\)\(.*/usr/local\):\1ENV["LOCALBASE"] || \2:' \
+ ${WRKSRC}/lib/pkgdb.rb ${WRKSRC}/lib/pkgtools.rb
+
post-install:
if [ ! -f ${PREFIX}/etc/pkgtools.conf ]; then \
${CP} -p ${PREFIX}/etc/pkgtools.conf.sample ${PREFIX}/etc/pkgtools.conf; \
--- a.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list