summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2007-06-04 16:13:31 +0000
committerMarc Espie <espie@cvs.openbsd.org>2007-06-04 16:13:31 +0000
commitbc6c53654837246be3d82b85769a64ccdf1b7132 (patch)
treecae63f4c7602ff27f926c5363ba553c60df0b637 /usr.sbin/pkg_add
parent12bbc3234d424f5764960cfdb4625c56ad12ceba (diff)
stricter regexp for libraries.
Put the directory *last* as it can be empty, which breaks havoc with tests.
Diffstat (limited to 'usr.sbin/pkg_add')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackingElement.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm
index add6d058208..01c2a546262 100644
--- a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: PackingElement.pm,v 1.130 2007/06/04 15:57:09 espie Exp $
+# $OpenBSD: PackingElement.pm,v 1.131 2007/06/04 16:13:30 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -498,8 +498,8 @@ sub ensure_ldconfig
sub parse
{
my ($self, $filename) = @_;
- if ($filename =~ m/^(.*)\/?lib(.*?)\.so\.(\d+)\.(\d+)$/o) {
- return ($1, $2, $3, $4);
+ if ($filename =~ m/^(.*?)\/?lib([^\/]+)\.so\.(\d+)\.(\d+)$/o) {
+ return ($2, $3, $4, $1);
} else {
return undef;
}