diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2011-07-12 10:06:58 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2011-07-12 10:06:58 +0000 |
commit | c1254ada3c48e1f99938ec17d7199c992abd892e (patch) | |
tree | 7c6e94cd1375ec39c47dd0b3e7902ce8c5f86a34 | |
parent | af309b8d9387e656d915de336a5444337594dad7 (diff) |
move option -a up into common add/delete code, in preparation for pkg_delete
change.
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/AddDelete.pm | 5 | ||||
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PkgAdd.pm | 5 |
2 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/AddDelete.pm b/usr.sbin/pkg_add/OpenBSD/AddDelete.pm index 6534e78247f..61b82c0194e 100644 --- a/usr.sbin/pkg_add/OpenBSD/AddDelete.pm +++ b/usr.sbin/pkg_add/OpenBSD/AddDelete.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: AddDelete.pm,v 1.46 2011/03/07 09:26:47 espie Exp $ +# $OpenBSD: AddDelete.pm,v 1.47 2011/07/12 10:06:57 espie Exp $ # # Copyright (c) 2007-2010 Marc Espie <espie@openbsd.org> # @@ -144,7 +144,7 @@ sub handle_options } }; $state->{no_exports} = 1; - $state->SUPER::handle_options($opt_string.'ciInqsB:F:', @usage); + $state->SUPER::handle_options($opt_string.'aciInqsB:F:', @usage); if ($state->opt('s')) { $state->{not} = 1; @@ -157,6 +157,7 @@ sub handle_options $state->{quick} = $state->opt('q') || $state->config->istrue("nochecksum"); $state->{extra} = $state->opt('c'); $state->{dont_run_scripts} = $state->opt('I'); + $state->{automatic} = $state->opt('a') // 0; $ENV{'PKG_DELETE_EXTRA'} = $state->{extra} ? "Yes" : "No"; } diff --git a/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm b/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm index 2af03232f2a..cf09420dfc9 100644 --- a/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm +++ b/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm @@ -1,7 +1,7 @@ #! /usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: PkgAdd.pm,v 1.23 2011/06/27 12:17:38 espie Exp $ +# $OpenBSD: PkgAdd.pm,v 1.24 2011/07/12 10:06:57 espie Exp $ # # Copyright (c) 2003-2010 Marc Espie <espie@openbsd.org> # @@ -103,7 +103,7 @@ our @ISA = qw(OpenBSD::AddDelete::State); sub handle_options { my $state = shift; - $state->SUPER::handle_options('aruUzl:A:P:Q:', + $state->SUPER::handle_options('ruUzl:A:P:Q:', '[-acIinqrsUuvxz] [-A arch] [-B pkg-destdir] [-D name[=value]]', '[-L localbase] [-l file] [-P type] [-Q quick-destdir] pkg-name [...]'); @@ -144,7 +144,6 @@ sub handle_options } - $state->{automatic} = $state->opt('a'); $state->{hard_replace} = $state->opt('r'); $state->{newupdates} = $state->opt('u') || $state->opt('U'); $state->{allow_replacing} = $state->{hard_replace} || |