summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2004-10-17 09:32:22 +0000
committerMarc Espie <espie@cvs.openbsd.org>2004-10-17 09:32:22 +0000
commite62b4fd9283299fce2bb299dd2c1c5f066c81ff6 (patch)
tree0eac1b35d82482556d6bb95c326499aea8994b3d /usr.sbin/pkg_add
parentaf2eaac9c4313fe0f6456ecfeabcef2a8d9f4284 (diff)
behave according to documentation, e.g., delete groups/users only if -c.
fix typo.
Diffstat (limited to 'usr.sbin/pkg_add')
-rw-r--r--usr.sbin/pkg_add/pkg_add16
-rw-r--r--usr.sbin/pkg_add/pkg_delete5
2 files changed, 16 insertions, 5 deletions
diff --git a/usr.sbin/pkg_add/pkg_add b/usr.sbin/pkg_add/pkg_add
index 2e479acd5a6..6641dba0344 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.77 2004/10/16 11:01:29 espie Exp $
+# $OpenBSD: pkg_add,v 1.78 2004/10/17 09:32:21 espie Exp $
#
# Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org>
#
@@ -472,7 +472,12 @@ sub pre_add($$)
my $operation = $state->{not} ? "Pretending to add" : "Adding";
if ($pkg ne '-') {
- print "$operation $pkg\n";
+ my $more = "";
+ if ($state->{do_faked}) {
+ $more = " under ".$state->{destdir};
+ }
+
+ print "$operation $pkg$more\n";
$pkgname1 = OpenBSD::PackageName::url2pkgname($pkg);
return undef unless can_install($pkgname1, $state);
}
@@ -504,7 +509,12 @@ sub pre_add($$)
return undef;
}
} else {
- print "$operation $pkgname\n";
+ my $modifier = "";
+ if ($state->{do_faked}) {
+ $modifier = " under ".$state->{destdir};
+ }
+
+ print "$operation $pkgname$modifier\n";
return undef unless can_install($pkgname, $state);
}
# second handling of conflicts
diff --git a/usr.sbin/pkg_add/pkg_delete b/usr.sbin/pkg_add/pkg_delete
index 78f6388928c..bfa2afbad8e 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.56 2004/10/11 14:40:04 espie Exp $
+# $OpenBSD: pkg_delete,v 1.57 2004/10/17 09:32:21 espie Exp $
#
# Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org>
#
@@ -81,6 +81,7 @@ sub cleanup_shared_items
}
}
}
+ return unless $state->{extra};
if (defined $u) {
for my $user (keys %$u) {
next if $remaining->{users}->{$user};
@@ -293,7 +294,7 @@ sub delete
if ($state->{quick}) {
unless ($state->{extra}) {
- print "NOT'deleting file $realname\n";
+ print "NOT deleting file $realname\n";
return;
}
} else {