diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2011-09-10 08:46:38 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2011-09-10 08:46:38 +0000 |
commit | 9328b0d368d2f4f8cb098d92e55e93ecdd344c78 (patch) | |
tree | f9f6ac20ae6dd048a6d78ce33382b53d9b4df10d /usr.sbin | |
parent | f37eda12b3a9704178453a9aa1a4d21d94fa5f59 (diff) |
let pkg_mklocatedb work consistently with SUBDIRLIST (print only the
fullpkgpaths referenced there and nothing more)
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pkg_add/pkg_mklocatedb | 6 | ||||
-rw-r--r-- | usr.sbin/pkg_add/pkg_mklocatedb.1 | 18 |
2 files changed, 20 insertions, 4 deletions
diff --git a/usr.sbin/pkg_add/pkg_mklocatedb b/usr.sbin/pkg_add/pkg_mklocatedb index 0bfbc9d2165..cd296e32183 100644 --- a/usr.sbin/pkg_add/pkg_mklocatedb +++ b/usr.sbin/pkg_add/pkg_mklocatedb @@ -1,6 +1,6 @@ #! /usr/bin/perl # Copyright (c) 2005-2010 Marc Espie <espie@openbsd.org> -# $OpenBSD: pkg_mklocatedb,v 1.29 2010/07/28 12:19:54 espie Exp $ +# $OpenBSD: pkg_mklocatedb,v 1.30 2011/09/10 08:46:37 espie Exp $ # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -170,7 +170,9 @@ sub do_portsdir { my $state = shift; my $make = $ENV{MAKE} || 'make'; - open my $in, "cd $state->{portsdir} && $make print-plist-all |"; + my $target = defined $ENV{SUBDIRLIST} ? + 'print-plist' : 'print-plist-all'; + open my $in, "cd $state->{portsdir} && $make $target |"; my $done = 0; while (!$done) { my $plist = OpenBSD::PackingList->read($in, diff --git a/usr.sbin/pkg_add/pkg_mklocatedb.1 b/usr.sbin/pkg_add/pkg_mklocatedb.1 index a0554948604..d6fcf893bfb 100644 --- a/usr.sbin/pkg_add/pkg_mklocatedb.1 +++ b/usr.sbin/pkg_add/pkg_mklocatedb.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: pkg_mklocatedb.1,v 1.12 2010/06/09 10:25:17 espie Exp $ +.\" $OpenBSD: pkg_mklocatedb.1,v 1.13 2011/09/10 08:46:37 espie Exp $ .\" Copyright (c) 2005-2007 Marc Espie <espie@openbsd.org> .\" .\" Permission to use, copy, modify, and distribute this software for any @@ -13,7 +13,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: June 9 2010 $ +.Dd $Mdocdate: September 10 2011 $ .Dt PKG_MKLOCATEDB 1 .Os .Sh NAME @@ -44,8 +44,22 @@ Entries created for each package will have the package name prepended: If the .Fl p option is used, +and +.Ev SUBDIRLIST +is not defined, .Nm will retrieve all package entries from the ports tree. +.Pp +If the +.Fl p +option is used +together with +.Ev SUBDIRLIST , +.Nm +will retrieve the package entries listed in +.Ev SUBDIRLIST +from the ports tree. +.Pp Otherwise, .Nm will build database entries for every file object for each |