summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/pkg_delete
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/pkg_add/pkg_delete')
-rw-r--r--usr.sbin/pkg_add/pkg_delete16
1 files changed, 8 insertions, 8 deletions
diff --git a/usr.sbin/pkg_add/pkg_delete b/usr.sbin/pkg_add/pkg_delete
index cf4665278b8..ec8d5424806 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.78 2004/11/14 13:20:07 espie Exp $
+# $OpenBSD: pkg_delete,v 1.79 2004/11/15 11:39:05 espie Exp $
#
# Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org>
#
@@ -71,6 +71,13 @@ $state->{beverbose} = $opt_n || ($opt_v >= 2);
$state->{extra} = $opt_c;
$state->{dont_run_scripts} = $opt_I;
$state->{forced} = \%forced;
+$state->{destdir} = $opt_B;
+if ($opt_B eq '') {
+ $state->{destdirname} = '';
+} else {
+ $state->{destdirname} = '${PKG_DESTDIR}';
+}
+
$ENV{'PKG_DELETE_EXTRA'} = $state->{extra} ? "Yes" : "No";
if (!$opt_x && !$state->{beverbose}) {
@@ -149,13 +156,6 @@ if ($bad) {
exit(1);
}
-$state->{destdir} = $opt_B;
-if ($opt_B eq '') {
- $state->{destdirname} = '';
-} else {
- $state->{destdirname} = '${PKG_DESTDIR}';
-}
-
eval {
# and finally, handle the removal
{ do {