diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2010-06-25 10:34:04 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2010-06-25 10:34:04 +0000 |
commit | 878bae102aaad6480ad00ac249a10286ef5c763d (patch) | |
tree | 301294bc92d1e330933b501c26e9b65913cfb490 | |
parent | c0e5439cf4bb77d3ab84e689665a4e63f8892d66 (diff) |
do options the other way so that we provide defaults that can be overridden
locally
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/AddCreateDelete.pm | 4 | ||||
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackageLocation.pm | 2 | ||||
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/State.pm | 10 | ||||
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/UpdateSet.pm | 2 |
4 files changed, 9 insertions, 9 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/AddCreateDelete.pm b/usr.sbin/pkg_add/OpenBSD/AddCreateDelete.pm index 3f09866af3f..20b43200fc7 100644 --- a/usr.sbin/pkg_add/OpenBSD/AddCreateDelete.pm +++ b/usr.sbin/pkg_add/OpenBSD/AddCreateDelete.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: AddCreateDelete.pm,v 1.7 2010/06/25 10:19:00 espie Exp $ +# $OpenBSD: AddCreateDelete.pm,v 1.8 2010/06/25 10:34:03 espie Exp $ # # Copyright (c) 2007-2010 Marc Espie <espie@openbsd.org> # @@ -64,7 +64,7 @@ sub handle_options { my ($state, $opt_string, @usage) = @_; - $state->SUPER::handle_options('mnx'.$opt_string, @usage); + $state->SUPER::handle_options($opt_string.'mnx', @usage); $state->progress->setup($state->opt('x'), $state->opt('m')); $state->{not} = $state->opt('n'); diff --git a/usr.sbin/pkg_add/OpenBSD/PackageLocation.pm b/usr.sbin/pkg_add/OpenBSD/PackageLocation.pm index e7c9ee798b5..8ca296e4a04 100644 --- a/usr.sbin/pkg_add/OpenBSD/PackageLocation.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackageLocation.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: PackageLocation.pm,v 1.19 2010/05/10 09:17:55 espie Exp $ +# $OpenBSD: PackageLocation.pm,v 1.20 2010/06/25 10:34:03 espie Exp $ # # Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org> # diff --git a/usr.sbin/pkg_add/OpenBSD/State.pm b/usr.sbin/pkg_add/OpenBSD/State.pm index 0e8c97f9000..5e5a95cd489 100644 --- a/usr.sbin/pkg_add/OpenBSD/State.pm +++ b/usr.sbin/pkg_add/OpenBSD/State.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: State.pm,v 1.5 2010/06/25 10:19:00 espie Exp $ +# $OpenBSD: State.pm,v 1.6 2010/06/25 10:34:03 espie Exp $ # # Copyright (c) 2007-2010 Marc Espie <espie@openbsd.org> # @@ -153,14 +153,14 @@ sub handle_options my ($state, $opt_string, @usage) = @_; require OpenBSD::Getopt; - $state->{opt}{v} = 0; - $state->{opt}{h} = sub { $state->usage; }; + $state->{opt}{v} = 0 unless $opt_string =~ m/v/; + $state->{opt}{h} = sub { $state->usage; } unless $opt_string =~ m/h/; $state->{opt}{D} = sub { $state->{subst}->parse_option(shift); - }; + } unless $opt_string =~ m/D/; $state->usage_is(@usage); $state->do_options(sub { - OpenBSD::Getopt::getopts('hvD:'.$opt_string, $state->{opt}); + OpenBSD::Getopt::getopts($opt_string.'hvD:', $state->{opt}); }); $state->{v} = $state->opt('v'); return if $state->{no_exports}; diff --git a/usr.sbin/pkg_add/OpenBSD/UpdateSet.pm b/usr.sbin/pkg_add/OpenBSD/UpdateSet.pm index 4cc0f94c933..f1b6de3ea6f 100644 --- a/usr.sbin/pkg_add/OpenBSD/UpdateSet.pm +++ b/usr.sbin/pkg_add/OpenBSD/UpdateSet.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: UpdateSet.pm,v 1.56 2010/06/04 13:19:39 espie Exp $ +# $OpenBSD: UpdateSet.pm,v 1.57 2010/06/25 10:34:03 espie Exp $ # # Copyright (c) 2007-2010 Marc Espie <espie@openbsd.org> # |