Subject: Re: hardcoded prefix path in pkgtools/pkg_install
To: Douwe Kiela <virtus@wanadoo.nl>
From: Thomas Klausner <wiz@NetBSD.org>
List: tech-pkg
Date: 09/28/2003 15:07:45
On Sun, Sep 28, 2003 at 02:47:03PM +0200, Douwe Kiela wrote:
> But that still doesn't solve the hardcoded, /usr/pkg is hardcoded in all the
> Makefiles
> in pkgtools/pkg_install and also in linkfarm.sh. Am I overlooking something
> again? :P

# cd /usr/pkgsrc/pkgtool/pkg_install
# grep -r /usr/pkg .
./files/add/pkg_add.1:.Pa /usr/pkg .
./files/add/pkg_add.1:.Pa /usr/pkgsrc/packages/All .
./files/add/pkg_add.1:# pkg_add /usr/pkgsrc/packages/All/tcsh-6.10.00.tgz
./files/add/pkg_add.1:# pkg_add -v /usr/pkgsrc/packages/All/unzip
./files/add/pkg_add.cat1:     # pkg_add /usr/pkgsrc/packages/All/tcsh-6.10.00.tgz
./files/add/pkg_add.cat1:     # pkg_add -v /usr/pkgsrc/packages/All/unzip
./files/view/linkfarm.1:.Pa /usr/pkg
./files/view/linkfarm.1:.Pa /usr/pkg ,
./files/view/pkg_view.1:.Pa ( /usr/pkg/packages/\*[Lt]pkg-name\*[Gt]/ ) .
./files/view/pkg_view.1:.Pa /usr/pkg
./files/view/pkg_view.1:.Pa /usr/pkg .
./files/view/linkfarm.sh.in:target=${LOCALBASE:-/usr/pkg}
./files/view/pkg_view.sh.in:viewbase=${LOCALBASE:-/usr/pkg}
./files/tkpkg:#!/usr/pkg/bin/wish -f
./files/admin/pkg_admin.1:yui# cd /usr/pkgsrc/packages/i386ELF/All/
./files/admin/pkg_admin.1:/usr/pkgsrc/packages/i386ELF/All/unzip-5.40.tgz
./files/admin/pkg_admin.1:/usr/pkgsrc/packages/i386ELF/All/unzip-5.41.tgz
./files/admin/pkg_admin.1:/usr/pkgsrc/packages/i386ELF/All/unzip-5.40.tgz
./files/admin/pkg_admin.1:/usr/pkgsrc/packages/i386ELF/All/unzip-5.41.tgz
./files/admin/pkg_admin.1:/usr/pkgsrc/packages/i386ELF/All/unzip-5.41.tgz
./files/admin/pkg_admin.1:/usr/pkgsrc/packages/i386ELF/All/unzip-5.41.tgz
./files/admin/pkg_admin.1:yui# pkg_admin lsall /usr/pkgsrc/packages/i386ELF/All/'{mit,unproven}-pthread*'
./files/admin/pkg_admin.1:/usr/pkgsrc/packages/i386ELF/All/mit-pthreads-1.60b6.tgz
./files/admin/pkg_admin.1:/usr/pkgsrc/packages/i386ELF/All/unproven-pthreads-0.15.tgz
./files/admin/pkg_admin.cat1:             yui# cd /usr/pkgsrc/packages/i386ELF/All/
./files/admin/pkg_admin.cat1:             /usr/pkgsrc/packages/i386ELF/All/unzip-5.40.tgz
./files/admin/pkg_admin.cat1:             /usr/pkgsrc/packages/i386ELF/All/unzip-5.41.tgz
./files/admin/pkg_admin.cat1:             /usr/pkgsrc/packages/i386ELF/All/unzip-5.40.tgz
./files/admin/pkg_admin.cat1:             /usr/pkgsrc/packages/i386ELF/All/unzip-5.41.tgz
./files/admin/pkg_admin.cat1:             /usr/pkgsrc/packages/i386ELF/All/unzip-5.41.tgz
./files/admin/pkg_admin.cat1:             /usr/pkgsrc/packages/i386ELF/All/unzip-5.41.tgz
./files/admin/pkg_admin.cat1:             yui# pkg_admin lsall /usr/pkgsrc/packages/i386ELF/All/'{mit,unproven}-pthread*'
./files/admin/pkg_admin.cat1:             /usr/pkgsrc/packages/i386ELF/All/mit-pthreads-1.60b6.tgz
./files/admin/pkg_admin.cat1:             /usr/pkgsrc/packages/i386ELF/All/unproven-pthreads-0.15.tgz

So this shows us lots of hits in manpages, and three hits in other files:
./files/view/linkfarm.sh.in:target=${LOCALBASE:-/usr/pkg}
./files/view/pkg_view.sh.in:viewbase=${LOCALBASE:-/usr/pkg}

These two default to /usr/pkg if LOCALBASE is not defined.

./files/tkpkg:#!/usr/pkg/bin/wish -f

That one should probably be fixed, but I'm not sure if
anyone is using it :)
 Thomas