summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2009-12-13 17:58:56 +0000
committerMarc Espie <espie@cvs.openbsd.org>2009-12-13 17:58:56 +0000
commit8bc211822df68d18462b2d9a364ea2f40a38b124 (patch)
tree3cde152563cd95207c0853f0bd01817c76111235 /usr.sbin/pkg_add/OpenBSD
parent4f90ae7fb25e8bd9130270939d3899b840ab021f (diff)
okay, so old libs are not 'kept', keep track of updates correctly instead
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Update.pm6
-rw-r--r--usr.sbin/pkg_add/OpenBSD/UpdateSet.pm5
2 files changed, 7 insertions, 4 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Update.pm b/usr.sbin/pkg_add/OpenBSD/Update.pm
index 76aa74ba9df..37eba7e2d29 100644
--- a/usr.sbin/pkg_add/OpenBSD/Update.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Update.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Update.pm,v 1.114 2009/12/12 17:08:07 espie Exp $
+# $OpenBSD: Update.pm,v 1.115 2009/12/13 17:58:55 espie Exp $
#
# Copyright (c) 2004-2006 Marc Espie <espie@openbsd.org>
#
@@ -80,7 +80,6 @@ sub process_handle
$state->say("Not updating .libs*, remember to clean them");
$first = 0;
}
- $h->{keepit} = 1;
return 0;
}
if ($pkgname =~ m/^partial\-/o) {
@@ -93,6 +92,7 @@ sub process_handle
eval {
if ($state->quirks->is_base_system($h, $state)) {
$h->{update_found} = 1;
+ $set->{updates}++;
}
};
return 1 if $h->{update_found};
@@ -275,7 +275,7 @@ sub process_set
if ($problem) {
$state->tracker->cant($set) if !$set->{quirks};
return 0;
- } elsif ($set->older_to_do == 0 && $set->newer == 0) {
+ } elsif ($set->{updates} == 0) {
$state->tracker->uptodate($set);
return 0;
}
diff --git a/usr.sbin/pkg_add/OpenBSD/UpdateSet.pm b/usr.sbin/pkg_add/OpenBSD/UpdateSet.pm
index ae35ba1690e..46bb9babd1b 100644
--- a/usr.sbin/pkg_add/OpenBSD/UpdateSet.pm
+++ b/usr.sbin/pkg_add/OpenBSD/UpdateSet.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: UpdateSet.pm,v 1.37 2009/12/13 17:54:15 espie Exp $
+# $OpenBSD: UpdateSet.pm,v 1.38 2009/12/13 17:58:55 espie Exp $
#
# Copyright (c) 2007 Marc Espie <espie@openbsd.org>
#
@@ -80,6 +80,7 @@ sub add_newer
my $self = shift;
for my $h (@_) {
$self->{newer}->{$h->pkgname} = $h;
+ $self->{updates}++;
}
return $self;
}
@@ -248,6 +249,8 @@ sub merge
$self->add_older($set->older);
# ... and mark it as already done
$set->{finished} = 1;
+ $self->{updates} += $set->{updates};
+ $set->{updates} = 0;
# XXX and mark it as merged, for eventual updates
$set->{merged} = $self;
}