From: espie Date: Wed, 27 Apr 2022 15:27:45 +0000 (+0000) Subject: have use_old_libs say something if it's the reason a package gets updated X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=fa50d613469c54785563675207c0e0037d98a0c6;p=openbsd have use_old_libs say something if it's the reason a package gets updated --- diff --git a/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm b/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm index 07079549813..e5d75d0b4bc 100644 --- a/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm +++ b/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm @@ -1,7 +1,7 @@ #! /usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: PkgAdd.pm,v 1.129 2022/04/27 15:19:03 espie Exp $ +# $OpenBSD: PkgAdd.pm,v 1.130 2022/04/27 15:27:45 espie Exp $ # # Copyright (c) 2003-2014 Marc Espie # @@ -26,11 +26,17 @@ package OpenBSD::PackingList; sub uses_old_libs { - my $plist = shift; + my ($plist, $state) = @_; require OpenBSD::RequiredBy; - return grep {/^\.libs\d*\-/o} - OpenBSD::Requiring->new($plist->pkgname)->list; + if (grep {/^\.libs\d*\-/o} + OpenBSD::Requiring->new($plist->pkgname)->list) { + $state->say("#1 still uses old .libs", $plist->pkgname) + if $state->verbose >= 3; + return 1; + } else { + return 0; + } } sub has_different_sig @@ -342,7 +348,7 @@ sub find_kept_handle (!$state->{allow_replacing} || !$state->defines('installed') && !$plist->has_different_sig($state) && - !$plist->uses_old_libs)) { + !$plist->uses_old_libs($state))) { $set->check_security($state, $plist, $n); return; }