summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2004-12-28 14:50:39 +0000
committerMarc Espie <espie@cvs.openbsd.org>2004-12-28 14:50:39 +0000
commitb6e7ee89b0666638000a75209e7d3a009aa9dbcf (patch)
tree6b3664e2e4c1805a1ead1425b2c801143eb68aa0 /usr.sbin/pkg_add/OpenBSD
parenta7566b557d5d14a4b528b6a39ca9b1d5fa061c47 (diff)
add a boguslibs forced option, that rescans packages for libraries
not marked with @lib. This allows pkg_add -current to deal with 3.6 packages fully.
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/SharedLibs.pm33
1 files changed, 32 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/SharedLibs.pm b/usr.sbin/pkg_add/OpenBSD/SharedLibs.pm
index 47ca79ca2ff..edda030d729 100644
--- a/usr.sbin/pkg_add/OpenBSD/SharedLibs.pm
+++ b/usr.sbin/pkg_add/OpenBSD/SharedLibs.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: SharedLibs.pm,v 1.5 2004/12/21 11:43:46 espie Exp $
+# $OpenBSD: SharedLibs.pm,v 1.6 2004/12/28 14:50:38 espie Exp $
#
# Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org>
#
@@ -23,6 +23,20 @@ sub mark_available_lib
{
}
+sub mark_bogus_lib
+{
+}
+
+package OpenBSD::PackingElement::FileBase;
+
+sub mark_bogus_lib
+{
+ my ($self, $pkgname) = @_;
+ my $fname = $self->fullname();
+ return unless $fname =~ m/\/lib[^\/]+\.so\.\d+\.\d+$/;
+ OpenBSD::SharedLibs::register_lib($fname, $pkgname);
+}
+
package OpenBSD::PackingElement::Lib;
sub mark_available_lib
@@ -31,6 +45,10 @@ sub mark_available_lib
OpenBSD::SharedLibs::register_lib($self->fullname(), $pkgname);
}
+sub mark_bogus_lib
+{
+}
+
package OpenBSD::SharedLibs;
use File::Basename;
use OpenBSD::Error;
@@ -131,6 +149,19 @@ sub add_package_libs
$plist->visit('mark_available_lib', $pkgname);
}
+sub add_bogus_package_libs
+{
+ my $pkgname = $_[0];
+ return if $done_plist->{$pkgname} == 2;
+ $done_plist->{$pkgname} = 2;
+ my $plist = OpenBSD::PackingList->from_installation($pkgname);
+ if (!defined $plist) {
+ Warn "Can't read plist for $pkgname\n";
+ return;
+ }
+ $plist->visit('mark_bogus_lib', $pkgname);
+}
+
sub add_plist_libs
{
my ($plist) = @_;