summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Delete.pm3
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackingList.pm4
-rw-r--r--usr.sbin/pkg_add/pkg_add9
-rw-r--r--usr.sbin/pkg_add/pkg_delete3
4 files changed, 9 insertions, 10 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Delete.pm b/usr.sbin/pkg_add/OpenBSD/Delete.pm
index ddc27c4f668..202312001ca 100644
--- a/usr.sbin/pkg_add/OpenBSD/Delete.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Delete.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Delete.pm,v 1.56 2007/05/31 11:05:41 espie Exp $
+# $OpenBSD: Delete.pm,v 1.57 2007/05/31 13:33:17 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -164,6 +164,7 @@ sub delete_plist
remove_packing_info($plist);
+ delete_installed($pkgname);
}
package OpenBSD::PackingElement;
diff --git a/usr.sbin/pkg_add/OpenBSD/PackingList.pm b/usr.sbin/pkg_add/OpenBSD/PackingList.pm
index 28fc60f7cdd..0708ad292e4 100644
--- a/usr.sbin/pkg_add/OpenBSD/PackingList.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PackingList.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: PackingList.pm,v 1.73 2007/05/31 13:11:21 espie Exp $
+# $OpenBSD: PackingList.pm,v 1.74 2007/05/31 13:33:17 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -426,7 +426,7 @@ sub from_installation
sub to_cache
{
my ($self) = @_;
- return if defined $plist_cache->{$self->pkgname()};
+ return if defined $plist_cache->{$self->pkgname};
my $plist = new OpenBSD::PackingList;
for my $c (@cache_categories) {
if (defined $self->{$c}) {
diff --git a/usr.sbin/pkg_add/pkg_add b/usr.sbin/pkg_add/pkg_add
index 3d664dc0e81..7293decd911 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.296 2007/05/31 10:04:03 espie Exp $
+# $OpenBSD: pkg_add,v 1.297 2007/05/31 13:33:17 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -334,6 +334,9 @@ sub really_add
for my $h ($set->newer) {
$h->{plist}->set_infodir($h->{location}->info);
}
+
+ $set->validate_plists($state);
+
my $handle = $set->handle;
my $plist = $handle->{plist};
my $pkgname = $handle->{pkgname};
@@ -355,9 +358,6 @@ sub really_add
# }
$state->{replacing} = $replacing;
- $set->validate_plists($state);
-
-
$ENV{'PKG_PREFIX'} = $state->{localbase};
my $handler = sub {
@@ -410,7 +410,6 @@ sub really_add
$set, $state);
};
- delete_installed($op->pkgname);
if (defined $state->{updatedepends}) {
delete $state->{updatedepends}->{$op->pkgname};
}
diff --git a/usr.sbin/pkg_add/pkg_delete b/usr.sbin/pkg_add/pkg_delete
index 99631c6d2fa..3da5a1f66a8 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.104 2007/05/30 15:10:07 espie Exp $
+# $OpenBSD: pkg_delete,v 1.105 2007/05/31 13:33:17 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -199,7 +199,6 @@ eval {
}
$state->set_pkgname($pkgname);
OpenBSD::Delete::delete_package($pkgname, $state);
- delete_installed($pkgname);
$done{$pkgname} = 1;
$removed++;
}