summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Add.pm6
-rw-r--r--usr.sbin/pkg_add/pkg_add9
2 files changed, 10 insertions, 5 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Add.pm b/usr.sbin/pkg_add/OpenBSD/Add.pm
index b59da32396b..483ee9c6abf 100644
--- a/usr.sbin/pkg_add/OpenBSD/Add.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Add.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Add.pm,v 1.37 2005/08/13 16:46:35 espie Exp $
+# $OpenBSD: Add.pm,v 1.38 2005/08/16 16:24:24 espie Exp $
#
# Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org>
#
@@ -132,10 +132,12 @@ sub validate_plist($$)
sub borked_installation
{
- my ($plist, $dir, @msg) = @_;
+ my ($plist, $dir, $not, @msg) = @_;
+ Fatal @msg if $not;
use OpenBSD::PackingElement;
+
my $borked = borked_package($plist->pkgname());
# fix packing list for pkg_delete
$plist->{items} = $plist->{done};
diff --git a/usr.sbin/pkg_add/pkg_add b/usr.sbin/pkg_add/pkg_add
index 1b9462dd91d..4a0e2399f2d 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.184 2005/08/16 16:15:28 espie Exp $
+# $OpenBSD: pkg_add,v 1.185 2005/08/16 16:24:23 espie Exp $
#
# Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org>
#
@@ -201,7 +201,6 @@ sub really_add($$)
{
my ($handle, $state) = @_;
my $destdir = $state->{destdir};
- my $not = $state->{not};
my $plist = $handle->{plist};
my $dir = $handle->info();
my $pkgname = $plist->pkgname();
@@ -284,7 +283,8 @@ sub really_add($$)
}
OpenBSD::ProgressMeter::next();
if ($interrupted || $errors) {
- OpenBSD::Add::borked_installation($plist, $dir,
+ OpenBSD::Add::borked_installation($plist, $dir,
+ $state->{not},
"Installation of $pkgname failed");
}
@@ -297,6 +297,7 @@ sub really_add($$)
} catchall {
Warn $_;
OpenBSD::Add::borked_installation($plist, $dir,
+ $state->{not},
"Deinstallation of ",
$op->pkgname(), " failed");
};
@@ -324,6 +325,7 @@ sub really_add($$)
if ($interrupted || $errors) {
OpenBSD::Add::borked_installation($plist, $dir,
+ $state->{not},
"Installation of $pkgname failed");
}
} else {
@@ -371,6 +373,7 @@ sub really_add($$)
unlink($dir.CONTENTS);
if ($interrupted || $errors) {
OpenBSD::Add::borked_installation($plist, $dir,
+ $state->{not},
"Installation of $pkgname failed");
}
OpenBSD::SharedLibs::add_plist_libs($plist);