NetBSD Problem Report #39456
From leonardo1990@gmail.com Wed Sep 3 20:30:40 2008
Return-Path: <leonardo1990@gmail.com>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id D514E63BC80
for <gnats-bugs@gnats.netbsd.org>; Wed, 3 Sep 2008 20:30:39 +0000 (UTC)
Message-Id: <48bef21a.2534440a.114b.ffffc9fc@mx.google.com>
Date: Wed, 03 Sep 2008 13:22:50 -0700 (PDT)
From: leonardo1990@gmail.com
Reply-To: leonardo1990@gmail.com
To: gnats-bugs@gnats.NetBSD.org
Subject: DESTDIR support for pkgtools/pkgclean
X-Send-Pr-Version: 3.95
>Number: 39456
>Category: pkg
>Synopsis: pkgtools/pkgclean: doesn't support DESTDIR
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: closed
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Wed Sep 03 20:35:00 +0000 2008
>Closed-Date: Sun Sep 07 01:42:20 +0000 2008
>Last-Modified: Sun Sep 07 01:45:00 +0000 2008
>Originator: Leonardo Taccari
>Release: NetBSD 4.0
>Organization:
NetBSD Italia
>Environment:
System: NetBSD bianconiglio 4.0 NetBSD 4.0 (BIANCONIGLIO) #3: Tue Jul 1 06:54:05 CEST 2008 leot@bianconiglio:/home/leot/builds/usr/src/sys/arch/i386/compile/BIANCONIGLIO i386
Architecture: i386
Machine: i386
>Description:
pkgtools/pkgclean doesn't support DESTDIR and has got various typos that could
be fixed with the help of pkglint(1).
pkglint(1) reports two warnings: the first about the @${CP}, that could be
fixed with the cleaner ${RUN} (special thanks to Aleksej Saushev for
this tip) and the second about the alignement of SUBST_CLASSES with spaces.
>How-To-Repeat:
For the DESTDIR support:
$ cd ${PKGSRCDIR}/pkgtools/pkgclean
$ USE_DESTDIR=full make install
For the pkglint(1) warnings:
$ cd ${PKGSRCDIR}/pkgtools/pkgclean
$ pkglint -Wall
>Fix:
Please apply this simple patch. Thanks a lot!
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/pkgtools/pkgclean/Makefile,v
retrieving revision 1.13
diff -u -p -r1.13 Makefile
--- Makefile 18 May 2007 10:03:31 -0000 1.13
+++ Makefile 3 Sep 2008 20:04:25 -0000
@@ -8,6 +8,7 @@ DISTFILES= # empty
MAINTAINER= pkgsrc-users@NetBSD.org
COMMENT= Quickly clean up all work directories in pkgsrc
+PKG_DESTDIR_SUPPORT= user-destdir
PKG_INSTALLATION_TYPES= overwrite pkgviews
NO_CHECKSUM= yes
@@ -17,13 +18,13 @@ NO_BUILD= yes
INSTALLATION_DIRS= bin ${PKGMANDIR}/man1
do-extract:
- @${CP} -R ${FILESDIR} ${WRKSRC}
+ ${RUN} ${CP} -R ${FILESDIR} ${WRKSRC}
do-install:
- ${INSTALL_SCRIPT} ${WRKSRC}/pkgclean.sh ${PREFIX}/bin/pkgclean
- ${INSTALL_MAN} ${WRKSRC}/pkgclean.1 ${PREFIX}/${PKGMANDIR}/man1/pkgclean.1
+ ${INSTALL_SCRIPT} ${WRKSRC}/pkgclean.sh ${DESTDIR}${PREFIX}/bin/pkgclean
+ ${INSTALL_MAN} ${WRKSRC}/pkgclean.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/pkgclean.1
-SUBST_CLASSES+= path
+SUBST_CLASSES+= path
SUBST_STAGE.path= post-patch
SUBST_FILES.path= pkgclean.sh pkgclean.1
SUBST_SED.path+= -e 's,@SH@,${SH},g'
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: obache@NetBSD.org
State-Changed-When: Sun, 07 Sep 2008 01:42:20 +0000
State-Changed-Why:
Fixed. Thanks!
From: OBATA Akio <obache@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/39456 CVS commit: pkgsrc/pkgtools/pkgclean
Date: Sun, 7 Sep 2008 01:41:39 +0000 (UTC)
Module Name: pkgsrc
Committed By: obache
Date: Sun Sep 7 01:41:39 UTC 2008
Modified Files:
pkgsrc/pkgtools/pkgclean: Makefile
Log Message:
DESTDIR support and pkglint clean.
Requestd by PR 39456.
To generate a diff of this commit:
cvs rdiff -r1.13 -r1.14 pkgsrc/pkgtools/pkgclean/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(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.