NetBSD Problem Report #41092

From sbd@users.sf.net  Sun Mar 29 04:17:57 2009
Return-Path: <sbd@users.sf.net>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 07B0A63B8BA
	for <gnats-bugs@gnats.netbsd.org>; Sun, 29 Mar 2009 04:17:57 +0000 (UTC)
Message-Id: <20090329041754.8AB9346434E@oberon.wxnz.net>
Date: Sun, 29 Mar 2009 17:17:36 +1300 (NZDT)
From: Steven Drake <sbd@users.sf.net>
To: gnats-bugs@gnats.netbsd.org
Subject: pkgtools/pkg_select SUBST_SED.path causes an incorrect substution.

>Number:         41092
>Category:       pkg
>Synopsis:       pkgtools/pkg_select SUBST_SED.path causes an incorrect substution.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Mar 29 04:20:00 +0000 2009
>Closed-Date:    Sun Mar 29 09:09:40 +0000 2009
>Last-Modified:  Mon May 04 13:45:04 +0000 2009
>Originator:     Steven Drake
>Release:        pkgsrc-2008Q4
>Organization:
>Environment:
System: Linux idran.drake.org.nz 2.6.29 #4 PREEMPT Fri Mar 27 17:12:35 NZDT 2009 i686 pentium4 i386 GNU/Linux
Architecture: pentium4
Machine: i686
C library: GNU C Library stable release version 2.5, by Roland McGrath et al.

>Description:
In the SUBST_SED.path expressions the pattern to match '/usr/pkg' also matchs 
the begining of '/usr/pkgsrc' and causes an incorrect substution. 

ie. in the how-to-repeat examlpe it should read PKGSRCBASE=\"/usr/pkgsrc\"

>How-To-Repeat:
$ make show-vars VARNAMES="LOCALBASE PKGSRCDIR"
/usr/local
/usr/pkgsrc
$ make >/dev/null
$ grep 'PKGSRCBASE' work/pkg_select/Makefile
CFLAGS+=        -DPKGSRCBASE=\"/usr/localsrc\" -DPKGDB=\"/var/db/pkg\"

>Fix:
--- Makefile    12 Jun 2008 02:14:42 -0000      1.10
+++ Makefile    29 Mar 2009 04:13:28 -0000
@@ -27,7 +27,7 @@ SUBST_MESSAGE.path=   Adjusting path.
 SUBST_FILES.path=      Makefile pkg_select.1 ${PKGBASE}.conf.example
 SUBST_SED.path=                -e "s|/usr/pkgsrc|${PKGSRCDIR}|g"
 SUBST_SED.path+=       -e "s|/usr/pkg/etc|${PKG_SYSCONFDIR}|g"
-SUBST_SED.path+=       -e "s|/usr/pkg|${PREFIX}|g"
+SUBST_SED.path+=       -e "s|/usr/pkg/|${PREFIX}/|g"
 SUBST_SED.path+=       -e "s|/var/db/pkg|${PKG_DBDIR}|g"
 SUBST_SED.path+=       -e "s|/usr/bin/make|${MAKE}|g"



>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Sun, 29 Mar 2009 09:09:40 +0000
State-Changed-Why:
Fixed, thanks!


From: Thomas Klausner <wiz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/41092 CVS commit: pkgsrc/pkgtools/pkg_select
Date: Sun, 29 Mar 2009 09:09:18 +0000

 Module Name:	pkgsrc
 Committed By:	wiz
 Date:		Sun Mar 29 09:09:18 UTC 2009

 Modified Files:
 	pkgsrc/pkgtools/pkg_select: Makefile

 Log Message:
 Fix substitution per PR 41092 from Steven Drake.
 Bump version.


 To generate a diff of this commit:
 cvs rdiff -u -r1.12 -r1.13 pkgsrc/pkgtools/pkg_select/Makefile

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Steven Drake <sbd@users.sf.net>
To: gnats-bugs@NetBSD.org, Thomas Klausner <wiz@netbsd.org>
Cc: 
Subject: Re: PR/41092 CVS commit: pkgsrc/pkgtools/pkg_select
Date: Mon, 4 May 2009 22:43:15 +1200 (NZST)

 Not quite fixed, the search pattern ends with a slash so the replacement 
 need to end with a slash!

 >How-To-Repeat:
 $ ident Makefile
      $NetBSD: Makefile,v 1.14 2009/04/03 16:06:43 imil Exp $
 $ make show-vars VARNAMES="LOCALBASE PKGSRCDIR"
 /usr/local
 /usr/pkgsrc
 $ make configure >/dev/null
 grep MIRRORS work/pkg_select-20090308/Makefile
 CFLAGS+=        -DMIRRORS=\"/usr/localshare/pkg_select\"

From: Thomas Klausner <wiz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/41092 CVS commit: pkgsrc/pkgtools/pkg_select
Date: Mon, 4 May 2009 13:43:39 +0000

 Module Name:	pkgsrc
 Committed By:	wiz
 Date:		Mon May  4 13:43:39 UTC 2009

 Modified Files:
 	pkgsrc/pkgtools/pkg_select: Makefile

 Log Message:
 Add slash to pattern. From Steven Drake in PR 41092.
 Bump PKGREVISION.


 To generate a diff of this commit:
 cvs rdiff -u -r1.14 -r1.15 pkgsrc/pkgtools/pkg_select/Makefile

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Thomas Klausner <wiz@netbsd.org>
To: Steven Drake <sbd@users.sf.net>
Cc: gnats-bugs@NetBSD.org
Subject: Re: PR/41092 CVS commit: pkgsrc/pkgtools/pkg_select
Date: Mon, 4 May 2009 15:43:59 +0200

 On Mon, May 04, 2009 at 10:43:15PM +1200, Steven Drake wrote:
 > Not quite fixed, the search pattern ends with a slash so the replacement 
 > need to end with a slash!

 Added the slash, thanks!
  Thomas

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.