diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2008-06-18 12:24:59 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2008-06-18 12:24:59 +0000 |
commit | e00ab68c76420f89c0b894b5196323166a60c61d (patch) | |
tree | 459bfb7857f55b402d3d7722bf9991a3401805db /usr.sbin | |
parent | 1938ea7bd2aa6fa41317440c5dfbad608667b56c (diff) |
better standards for inst: paths.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackageLocator.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm b/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm index 65ed3be343b..3fbe2ba8478 100644 --- a/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: PackageLocator.pm,v 1.74 2008/06/18 12:04:41 espie Exp $ +# $OpenBSD: PackageLocator.pm,v 1.75 2008/06/18 12:24:58 espie Exp $ # # Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org> # @@ -44,12 +44,13 @@ sub path_parse { use File::Basename; use OpenBSD::Paths; + my $pkg_db = $ENV{"PKG_DBDIR"} || OpenBSD::Paths->pkgdb; my ($pkgname, $path) = fileparse($_); my $repo; - if ($path eq OpenBSD::Paths::pkgdb().'/') { - $repo = OpenBSD::PackageRepository::Installed->new($path); + if ($path eq $pkg_db.'/') { + $repo = OpenBSD::PackageRepository::Installed->new; } else { $repo = OpenBSD::PackageRepository->new($path); } |