diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2004-11-18 21:51:44 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2004-11-18 21:51:44 +0000 |
commit | 12210a4311ec99423609af179ced07e2639f9065 (patch) | |
tree | a7959e63aa5e50787e9372041bd196ed0864b466 /usr.sbin/pkg_add/pkg_create | |
parent | 8d5511c2c78613ccea6d3bae00ab06cb4f58f89e (diff) |
document @wantlib, @depend. Provide -P and -W flags to be able to specify
those on the command line instead of having to generate a separate plist.
Diffstat (limited to 'usr.sbin/pkg_add/pkg_create')
-rw-r--r-- | usr.sbin/pkg_add/pkg_create | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/usr.sbin/pkg_add/pkg_create b/usr.sbin/pkg_add/pkg_create index 4e1e2e22bd8..50902db65e6 100644 --- a/usr.sbin/pkg_add/pkg_create +++ b/usr.sbin/pkg_add/pkg_create @@ -1,6 +1,6 @@ #! /usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: pkg_create,v 1.24 2004/11/15 16:47:54 espie Exp $ +# $OpenBSD: pkg_create,v 1.25 2004/11/18 21:51:43 espie Exp $ # # Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org> # @@ -219,12 +219,13 @@ our $errors = 0; our ($opt_p, $opt_f, $opt_c, $opt_d, $opt_v, $opt_i, $opt_k, $opt_r, $opt_S, $opt_h, $opt_s, $opt_O, $opt_A, $opt_L, - $opt_M, $opt_U, + $opt_M, $opt_U, $opt_P, $opt_W, $opt_B); my @contents; -getopts('p:f:c:d:vi:k:r:M:U:S:hs:OA:L:B:D:', +my $plist = new OpenBSD::PackingList; +getopts('p:f:c:d:vi:k:r:M:U:S:hs:OA:L:B:D:P:W:', {'D' => sub { local $_ = shift; @@ -237,6 +238,12 @@ getopts('p:f:c:d:vi:k:r:M:U:S:hs:OA:L:B:D:', 'f' => sub { push(@contents, shift); + }, + 'P' => sub { + OpenBSD::PackingElement::Dependency->add($plist, shift); + }, + 'W' => sub { + OpenBSD::PackingElement::Wantlib->add($plist, shift); } }); @@ -304,7 +311,6 @@ if (defined $opt_U) { copy_subst($opt_U, $dir.UNDISPLAY); } -my $plist = new OpenBSD::PackingList; my @extra_files = (); for my $special (info_names()) { next unless -f $dir.$special; @@ -408,6 +414,9 @@ if (defined $plist->{pkgcfl}) { print STDERR "Error: \@pkgcfl is obsolete, use \@conflict instead\n"; $errors++; } +if (defined $plist->{pkgdep}) { + print STDERR "\@pkgdep is obsolete, use \@depend instead\n"; +} if ($errors) { exit(1); } |