diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2004-11-11 12:29:21 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2004-11-11 12:29:21 +0000 |
commit | 5cabf9e88a3f734e93f78171e48b45303cbf40f4 (patch) | |
tree | 642e987ba43893b60fa3fa52d0d873159c12125c | |
parent | 2f736a52b3e8b69efc58fd96c25f21153903c36e (diff) |
store a ref to %forced in $state, for access anywhere.
-rw-r--r-- | usr.sbin/pkg_add/pkg_add | 4 | ||||
-rw-r--r-- | usr.sbin/pkg_add/pkg_delete | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/pkg_add b/usr.sbin/pkg_add/pkg_add index 3dfe35ebc78..0afcb391b3f 100644 --- a/usr.sbin/pkg_add/pkg_add +++ b/usr.sbin/pkg_add/pkg_add @@ -1,7 +1,7 @@ #! /usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: pkg_add,v 1.104 2004/11/11 12:17:25 espie Exp $ +# $OpenBSD: pkg_add,v 1.105 2004/11/11 12:29:20 espie Exp $ # # Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org> # @@ -538,6 +538,8 @@ $state->{do_faked} = 0; $state->{replace} = $opt_r; $state->{localbase} = $opt_L; $state->{arch} = $opt_A; +$state->{forced} = \%forced; + if (defined $opt_Q and defined $opt_B) { Fatal "-Q and -B are incompatible options"; } diff --git a/usr.sbin/pkg_add/pkg_delete b/usr.sbin/pkg_add/pkg_delete index 2b32d8705ea..504a8f78580 100644 --- a/usr.sbin/pkg_add/pkg_delete +++ b/usr.sbin/pkg_add/pkg_delete @@ -1,6 +1,6 @@ #!/usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: pkg_delete,v 1.73 2004/11/11 11:36:26 espie Exp $ +# $OpenBSD: pkg_delete,v 1.74 2004/11/11 12:29:20 espie Exp $ # # Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org> # @@ -69,6 +69,7 @@ $state->{very_verbose} = $opt_v; $state->{beverbose} = $opt_n || ($opt_v >= 2); $state->{extra} = $opt_c; $state->{dont_run_scripts} = $opt_I; +$state->{forced} = \%forced; $ENV{'PKG_DELETE_EXTRA'} = $state->{extra} ? "Yes" : "No"; if ($opt_x && $state->{beverbose}) { |