ports/166593: [MAINTAINER] ports-mgmt/porttools: CVS expansion of $FreeBSD:$ trashes sed pattern in util_diff
Johannes 5 Joemann
joemann at beefree.free.de
Mon Apr 2 21:50:01 UTC 2012
>Number: 166593
>Category: ports
>Synopsis: [MAINTAINER] ports-mgmt/porttools: CVS expansion of $FreeBSD:$ trashes sed pattern in util_diff
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Mon Apr 02 21:50:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Johannes 5 Joemann
>Release: FreeBSD 8.2-STABLE i386
>Organization:
>Environment:
System: FreeBSD xxx.free.de 8.2-STABLE FreeBSD 8.2-STABLE #0: Sat Oct 1 13:26:08 CEST
>Description:
- Avoid literal appearances of "$FreeBSD:...$" in patch-util_diff.in.
- While we are here:
- Make the affected sed pattern more flexible with regard to the
repository path from which the port was checked out.
- When handling -d <dir>, if the port's directory does not exist,
fix the path used in the first check for an alternative path.
- Bump PORTREVISION.
@committer: the patch below of files/patch-util_diff.in might fail,
because of differing implementations of the expansion of
"$FreeBSD:...$FreeBSD:...$". The patch below ist against the current
version of the port as obtained with cvs, which expands both instances
of "$FreeBSD:...$" in the sed pattern (which used to set
PORTBASENAME_HEADER in util_diff). In a ports tree obtained by csup,
only the first "$FreeBSD:...$" is expanded, but not the second one
(possibly because they overlap at the "$"). So if this hunk of the
patch fails for you, please manually replace line 93 of
files/patch-util_diff.in with its new version:
+ PORTBASENAME_HEADER=`sed -n -E -e '1,/^($|[^#].*$)|\\$FreeBSD\:/s%^#.*\\$FreeBSD\:[[:space:]]*([^/]+/)*([^/]+)/Makefile.*\\$%\2%p' Makefile`
Sorry for any inconvenience - but ports dealing with ports seem to
have an increased fun factor:-)
Generated with FreeBSD Port Tools 0.99_6 (mode: change, diff: CVSauto)
>How-To-Repeat:
>Fix:
--- porttools-0.99_6.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/ports-mgmt/porttools/Makefile,v
retrieving revision 1.31
diff -u -r1.31 Makefile
--- Makefile 1 Apr 2012 20:06:07 -0000 1.31
+++ Makefile 2 Apr 2012 21:19:23 -0000
@@ -7,7 +7,7 @@
PORTNAME= porttools
PORTVERSION= 0.99
-PORTREVISION= 5
+PORTREVISION= 6
CATEGORIES= ports-mgmt
MASTER_SITES= SF
Index: files/patch-util_diff.in
===================================================================
RCS file: /home/ncvs/ports/ports-mgmt/porttools/files/patch-util_diff.in,v
retrieving revision 1.5
diff -u -r1.5 patch-util_diff.in
--- files/patch-util_diff.in 3 Mar 2012 13:31:02 -0000 1.5
+++ files/patch-util_diff.in 2 Apr 2012 21:19:24 -0000
@@ -90,7 +90,7 @@
else
# Non-CVS modes
+ DIRBASENAME=`basename \`pwd\``
-+ PORTBASENAME_HEADER=`sed -n -E -e '1,/^($|[^#].*$)|\\$FreeBSD: ports/ports-mgmt/porttools/files/patch-util_diff.in,v 1.5 2012/03/03 13:31:02 crees Exp $FreeBSD: ports/ports-mgmt/porttools/files/patch-util_diff.in,v 1.5 2012/03/03 13:31:02 crees Exp $%\2%p' Makefile`
++ PORTBASENAME_HEADER=`sed -n -E -e '1,/^($|[^#].*$)|\\$FreeBSD\:/s%^#.*\\$FreeBSD\:[[:space:]]*([^/]+/)*([^/]+)/Makefile.*\\$%\2%p' Makefile`
+ if [ "${DIRBASENAME}" != "${PORTBASENAME_HEADER}" ]
+ then
+ echo "Warning: current directory name differs from Makefile header:"
@@ -116,7 +116,7 @@
+ if [ ! -d ${ORIG_DIR} ]
+ then
+ echo "Original version does not exist at ${ORIG_DIR}"
-+ if [ -d "${DIFF_MODE}/${CATEGORY}/${PORTBASENAME}" ]
++ if [ -d "${DIFF_MODE}/${CATEGORY}/${DIRBASENAME}" ]
+ then
+ PORTBASENAME=${DIRBASENAME}
+ ORIG_DIR="${DIFF_MODE}/${CATEGORY}/${PORTBASENAME}"
--- porttools-0.99_6.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list