summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2009-10-15 23:23:36 +0000
committerMarc Espie <espie@cvs.openbsd.org>2009-10-15 23:23:36 +0000
commit4c087c2e14db8c3d3b70b3cc0c345eb8c4de6fb8 (patch)
tree8f99a3a68ac54c51537fa8b8f818cdbbbf2f7a74 /usr.sbin
parentb9fdf5674d969d72e5289806da9acdacae771c65 (diff)
fix installation header
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pkg_add/pkg_add21
1 files changed, 13 insertions, 8 deletions
diff --git a/usr.sbin/pkg_add/pkg_add b/usr.sbin/pkg_add/pkg_add
index 1688014c229..fe88221fd34 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.356 2009/10/15 20:51:28 espie Exp $
+# $OpenBSD: pkg_add,v 1.357 2009/10/15 23:23:35 espie Exp $
#
# Copyright (c) 2003-2009 Marc Espie <espie@openbsd.org>
#
@@ -73,14 +73,13 @@ sub build_deptree
{
my ($state, $pkg, @deps) = @_;
- my $tree = $state->{deptree};
- # flatten info
- if (defined $tree->{$pkg}) {
- $pkg = $tree->{$pkg};
+ if (defined $state->{deptree}->{$pkg}) {
+ $pkg = $state->{deptree}->{$pkg};
}
for my $i (@deps) {
my $j = $i->handle->pkgname;
- $tree->{$j} = $pkg unless defined $tree->{$j};
+ $state->{deptree}->{$j} = $pkg unless
+ defined $state->{deptree}->{$j};
}
}
@@ -345,7 +344,8 @@ sub really_add
if ($replacing) {
for my $handle ($set->newer) {
my $pkgname = $handle->pkgname;
- $state->progress->set_header("$pkgname (extracting)");
+ my $header = $state->deptree_header($pkgname).$pkgname;
+ $state->progress->set_header("$header (extracting)");
try {
OpenBSD::Replace::perform_extraction($handle,
@@ -389,8 +389,13 @@ sub really_add
for my $handle ($set->newer) {
my $pkgname = $handle->pkgname;
+ my $header = $state->deptree_header($pkgname).$pkgname;
my $plist = $handle->{plist};
- $state->progress->set_header("$pkgname (installing)");
+ if ($replacing) {
+ $state->progress->set_header("$header (installing)");
+ } else {
+ $state->progress->set_header($header);
+ }
$state->set_name_from_handle($handle);
try {