diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2010-04-10 10:18:13 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2010-04-10 10:18:13 +0000 |
commit | 47b7b88a66b5634619fb08c26f2c26ec9790eae8 (patch) | |
tree | 85f29e241db3f6af3401df73e8bdfce35e485573 | |
parent | 06391926767686266b8d3e81e7f58737f62c9570 (diff) |
work around a limitation of tracker/updateset: hints are tagged as to_update.
So if we replace an existing package, we may end up merging with ourselves
because of the initial hint. Make sure we create an older handle even in that
case.
-rw-r--r-- | usr.sbin/pkg_add/pkg_add | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/pkg_add b/usr.sbin/pkg_add/pkg_add index bec8d4d631f..bffe7f01208 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.475 2010/04/05 13:46:24 espie Exp $ +# $OpenBSD: pkg_add,v 1.476 2010/04/10 10:18:12 espie Exp $ # # Copyright (c) 2003-2010 Marc Espie <espie@openbsd.org> # @@ -357,7 +357,7 @@ sub install_issues $later = 1; my $s = $state->tracker->is_to_update($toreplace); - if (defined $s) { + if (defined $s && $s ne $set) { $set->merge($state->tracker, $s); } else { $set->add_older(OpenBSD::Handle->create_old($toreplace, |