NetBSD Problem Report #26940

Received: (qmail 18381 invoked by uid 605); 13 Sep 2004 21:22:28 -0000
Message-Id: <20040913215329.DBB8D9236@panser>
Date: Mon, 13 Sep 2004 21:53:29 +0000 (UTC)
From: pancake@phreaker.net
Sender: gnats-bugs-owner@NetBSD.org
Reply-To: pancake@phreaker.net
To: gnats-bugs@gnats.NetBSD.org
Subject: pkg_tarup PATH order
X-Send-Pr-Version: 3.95

>Number:         26940
>Category:       pkg
>Synopsis:       pkg_tarup uses incorrect PATH order
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          closed
>Class:          support
>Submitter-Id:   net
>Arrival-Date:   Mon Sep 13 21:23:00 +0000 2004
>Closed-Date:    Wed Oct 13 23:19:12 +0000 2004
>Last-Modified:  Wed Oct 13 23:20:01 +0000 2004
>Originator:     
>Release:        NetBSD 2.0G
>Organization:

>Environment:


System: NetBSD pl2 2.0G NetBSD 2.0G (pancake-laptop) #10: Wed Jul 21 20:57:24 CEST 2004 pancake@panser:/usr/src/sys/arch/i386/compile/PANCAKE_LAPTOP i386
Architecture: i386
Machine: i386
>Description:
	I had some problems on freebsd and linux trying to use pkg_tarup it
	says that the pkg doesn't exists...problem is solved changing the path.

>How-To-Repeat:

#~> pkg_tarup bash
Warning: no package matching bash found
ERROR: No packages to tarup identified!
Usage: /usr/pkg/bin/pkg_tarup [-a] [-K pkg_dbdir] [-d pkgrepository] [-s pkg_sufx] installed_pkg|pattern [...]
The following environment variables are used:
(unless overriden by command line parameters)
PKGREPOSITORY - A destination directory for packages (/tmp)
PKG_DBDIR     - The location of the package database directory
PKG_SUFX      - The suffix to append to the package (.tgz)
#~> pkg_info -a| grep bash
bash-2.05.2.7nb2    The GNU Bourne Again Shell
#~> uname -a
FreeBSD porticoluna 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Wed Jul 21 19:27:12 CEST 2004     foo@porticoluna:/usr/obj/usr/src/sys/KERN_PLUNA2  i386
#~> 
/// APPLY THE PATCH
#~> vim /usr/pkg/bin/pkg_tarup
#~> pkg_tarup bash
Creating binary package: bash-2.05.2.7nb2
Creating package /tmp/bash-2.05.2.7nb2.tgz
Registering depends: gettext-lib>=0.11.5nb1.
Registering conflicts: static-bash-[0-9]*.
#~> 


>Fix:

Apply this patch to /usr/pkgsrc/pkgtools/pkg_tarup/files/pkg_tarup:

--- pkg_tarup.orig	2004-09-13 21:42:30.000000000 +0000
+++ pkg_tarup	2004-09-13 21:43:13.000000000 +0000
@@ -11,7 +11,7 @@

 PREFIX=${PREFIX:-@PREFIX@}

-PATH=/sbin:/usr/sbin:/bin:/usr/bin:${PREFIX}/sbin:${PREFIX}/bin:@PKG_TOOLS_BIN@
+PATH=${PREFIX}/sbin:${PREFIX}/bin:/sbin:/bin:/usr/sbin:/usr/bin:@PKG_TOOLS_BIN@
 export PATH

 OS=`uname -s`

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: xtraeme 
State-Changed-When: Wed Oct 13 23:18:52 UTC 2004 
State-Changed-Why:  
Patch applied, problem solved, thanks. 

From: Juan Romero Pardines <xtraeme@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:  
Subject: pr/26940 CVS commit: pkgsrc/pkgtools/pkg_tarup/files
Date: Wed, 13 Oct 2004 23:18:35 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	xtraeme
 Date:		Wed Oct 13 23:18:35 UTC 2004

 Modified Files:
 	pkgsrc/pkgtools/pkg_tarup/files: pkg_tarup pkg_tarup_all

 Log Message:
 Put ${PREFIX}/{bin,sbin} in PATH before /bin:/sbin:/usr/bin:/usr/sbin to
 fix problem reported by pancake in PR pkg/26940.


 To generate a diff of this commit:
 cvs rdiff -r1.16 -r1.17 pkgsrc/pkgtools/pkg_tarup/files/pkg_tarup
 cvs rdiff -r1.4 -r1.5 pkgsrc/pkgtools/pkg_tarup/files/pkg_tarup_all

 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.