NetBSD Problem Report #45085

From www@NetBSD.org  Mon Jun 20 13:40:56 2011
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 7C50E63BC45
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 20 Jun 2011 13:40:56 +0000 (UTC)
Message-Id: <20110620134053.33CA463BA98@www.NetBSD.org>
Date: Mon, 20 Jun 2011 13:40:53 +0000 (UTC)
From: tcort@minix3.org
Reply-To: tcort@minix3.org
To: gnats-bugs@NetBSD.org
Subject: pkgtools/pkgin use MAKE_DIRS instead of @exec ${MKDIR}
X-Send-Pr-Version: www-1.0

>Number:         45085
>Category:       pkg
>Synopsis:       pkgtools/pkgin use MAKE_DIRS instead of @exec ${MKDIR}
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 20 13:45:00 +0000 2011
>Closed-Date:    Mon Jun 20 15:17:32 +0000 2011
>Last-Modified:  Mon Jun 20 15:20:02 +0000 2011
>Originator:     Thomas Cort
>Release:        N/A
>Organization:
Minix3
>Environment:
Minix 192.168.122.210 3.2.0 i686
>Description:
During release building on Minix, we need to be able to install pkgin with
DESTDIR. Currently, pkgin uses "@exec ${MKDIR} %D/etc/pkgin" in PLIST. The
%D gets expanded to pkgsrc_root (not destdir/pkgsrc_root) which causes
problems for us.

We originally tried patching pkg_install in problem report pkgsrc/45078.
Joerg Sonnenberger suggested changing the package to use MAKE_DIRS.

Here's the patch to make pkgin use MAKE_DIRS.
>How-To-Repeat:

>Fix:
diff --git a/pkgtools/pkgin/Makefile b/pkgtools/pkgin/Makefile
index 9a2a038..5e1b23f 100644
--- a/pkgtools/pkgin/Makefile
+++ b/pkgtools/pkgin/Makefile
@@ -16,6 +16,7 @@ EGDIR=			${PREFIX}/share/examples/${PKGBASE}
 CONF_FILES=		${EGDIR}/repositories.conf.example		\
 			${PKG_SYSCONFDIR}/${PKGBASE}/repositories.conf

+MAKE_DIRS+=		${PKG_SYSCONFDIR}/${PKGBASE}
 OWN_DIRS+=		${PKG_SYSCONFDIR}/${PKGBASE}
 INSTALLATION_DIRS+=	bin ${PKGMANDIR}/man1 ${EGDIR}

diff --git a/pkgtools/pkgin/PLIST b/pkgtools/pkgin/PLIST
index d7c158b..0c80468 100644
--- a/pkgtools/pkgin/PLIST
+++ b/pkgtools/pkgin/PLIST
@@ -2,4 +2,3 @@
 bin/pkgin
 man/man1/pkgin.1
 share/examples/pkgin/repositories.conf.example
-@exec ${MKDIR} %D/etc/pkgin

>Release-Note:

>Audit-Trail:
From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/45085: pkgtools/pkgin use MAKE_DIRS instead of @exec ${MKDIR}
Date: Mon, 20 Jun 2011 16:44:48 +0200

 On Mon, Jun 20, 2011 at 01:45:00PM +0000, tcort@minix3.org wrote:
 > diff --git a/pkgtools/pkgin/Makefile b/pkgtools/pkgin/Makefile
 > index 9a2a038..5e1b23f 100644
 > --- a/pkgtools/pkgin/Makefile
 > +++ b/pkgtools/pkgin/Makefile
 > @@ -16,6 +16,7 @@ EGDIR=			${PREFIX}/share/examples/${PKGBASE}
 >  CONF_FILES=		${EGDIR}/repositories.conf.example		\
 >  			${PKG_SYSCONFDIR}/${PKGBASE}/repositories.conf
 >  
 > +MAKE_DIRS+=		${PKG_SYSCONFDIR}/${PKGBASE}
 >  OWN_DIRS+=		${PKG_SYSCONFDIR}/${PKGBASE}
 >  INSTALLATION_DIRS+=	bin ${PKGMANDIR}/man1 ${EGDIR}
 >  

 Isn't the OWN_DIRS enough? E.g. just drop the @exec from the PLIST?

 Joerg

From: Thomas Cort <tcort@minix3.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/45085: pkgtools/pkgin use MAKE_DIRS instead of @exec
 ${MKDIR}
Date: Mon, 20 Jun 2011 11:00:23 -0400

 > Isn't the OWN_DIRS enough? E.g. just drop the @exec from the PLIST?

 I just tested it without MAKE_DIRS. You are correct, OWN_DIRS is enough.

 diff --git a/pkgtools/pkgin/PLIST b/pkgtools/pkgin/PLIST
 index d7c158b..0c80468 100644
 --- a/pkgtools/pkgin/PLIST
 +++ b/pkgtools/pkgin/PLIST
 @@ -2,4 +2,3 @@
  bin/pkgin
  man/man1/pkgin.1
  share/examples/pkgin/repositories.conf.example
 -@exec ${MKDIR} %D/etc/pkgin

State-Changed-From-To: open->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Mon, 20 Jun 2011 15:17:32 +0000
State-Changed-Why:
Fixed, thanks.


From: "Thomas Klausner" <wiz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/45085 CVS commit: pkgsrc/pkgtools/pkgin
Date: Mon, 20 Jun 2011 15:16:27 +0000

 Module Name:	pkgsrc
 Committed By:	wiz
 Date:		Mon Jun 20 15:16:27 UTC 2011

 Modified Files:
 	pkgsrc/pkgtools/pkgin: PLIST

 Log Message:
 Remove unnecessary exec. PR 45085 by Thomas Cort.


 To generate a diff of this commit:
 cvs rdiff -u -r1.2 -r1.3 pkgsrc/pkgtools/pkgin/PLIST

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

>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.