diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2010-07-11 07:27:26 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2010-07-11 07:27:26 +0000 |
commit | e7a41bee042c0d0fa1c3dc3d288e7bbff680de91 (patch) | |
tree | bbbd90b9340c4b4323af682b2cf94acdc0e7b26f /usr.sbin/pkg_add | |
parent | 136940400efab0a42e9c7083b18a0af8c6d0fe81 (diff) |
display updateset name alongside collisionreport (turns out it's not
always obvious)
Diffstat (limited to 'usr.sbin/pkg_add')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/CollisionReport.pm | 9 | ||||
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/UpdateSet.pm | 4 |
2 files changed, 7 insertions, 6 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/CollisionReport.pm b/usr.sbin/pkg_add/OpenBSD/CollisionReport.pm index 811d908c607..1dbc773e31c 100644 --- a/usr.sbin/pkg_add/OpenBSD/CollisionReport.pm +++ b/usr.sbin/pkg_add/OpenBSD/CollisionReport.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: CollisionReport.pm,v 1.37 2010/06/30 10:51:04 espie Exp $ +# $OpenBSD: CollisionReport.pm,v 1.38 2010/07/11 07:27:25 espie Exp $ # # Copyright (c) 2003-2006 Marc Espie <espie@openbsd.org> # @@ -56,9 +56,9 @@ sub find_collisions return $bypkg; } -sub collision_report($$) +sub collision_report { - my ($list, $state) = @_; + my ($list, $state, $set) = @_; my $destdir = $state->{destdir}; @@ -74,7 +74,8 @@ sub collision_report($$) my $clueless_bat2; my $found = 0; - $state->errsay("Collision: the following files already exist"); + $state->errsay("Collision in #1: the following files already exist", + $set->print); if (!$state->defines('dontfindcollisions')) { my $bypkg = find_collisions(\%todo, $state); for my $pkg (sort keys %$bypkg) { diff --git a/usr.sbin/pkg_add/OpenBSD/UpdateSet.pm b/usr.sbin/pkg_add/OpenBSD/UpdateSet.pm index f766b4f8bd3..38ee050d89f 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.60 2010/06/30 10:51:04 espie Exp $ +# $OpenBSD: UpdateSet.pm,v 1.61 2010/07/11 07:27:25 espie Exp $ # # Copyright (c) 2007-2010 Marc Espie <espie@openbsd.org> # @@ -298,7 +298,7 @@ sub validate_plists if (@{$state->{colliding}} > 0) { require OpenBSD::CollisionReport; - OpenBSD::CollisionReport::collision_report($state->{colliding}, $state); + OpenBSD::CollisionReport::collision_report($state->{colliding}, $state, $self); } if (defined $state->{overflow}) { $state->vstat->tally; |