summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD/PkgSpec.pm
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2007-06-09 11:16:55 +0000
committerMarc Espie <espie@cvs.openbsd.org>2007-06-09 11:16:55 +0000
commit82c36963aebbc9857585762c82c7a5d111420c7e (patch)
tree18ea9b0482b3fdcc5dac28d0341fafdf99c3ef1a /usr.sbin/pkg_add/OpenBSD/PkgSpec.pm
parent522658dc278638b28c649f32cd350159c91395cf (diff)
rework `special' package names a bit.
- do a test to create partial-foo-1.0.1 instead of partial-partial-foo-1.0 when removing partial-foo fails. - have .libs name generation, e.g., .libs-foo, then .libs1-foo, then .libs2-foo instead of .libs-.libs-foo.... extend the pkgspec pattern slightly, so that all these are more or less equivalent for dependencies and conflicts. With this, we can do practically any scenario of shared libs updates and downgrades.
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD/PkgSpec.pm')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PkgSpec.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PkgSpec.pm b/usr.sbin/pkg_add/OpenBSD/PkgSpec.pm
index d8795327e10..ea1b19b8184 100644
--- a/usr.sbin/pkg_add/OpenBSD/PkgSpec.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PkgSpec.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: PkgSpec.pm,v 1.15 2007/06/04 20:48:23 espie Exp $
+# $OpenBSD: PkgSpec.pm,v 1.16 2007/06/09 11:16:54 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -174,6 +174,7 @@ sub subpattern_match
$stemspec =~ s/\+/\\\+/go;
$stemspec =~ s/\*/\.\*/go;
$stemspec =~ s/\?/\./go;
+ $stemspec =~ s/^(\\\.libs)\-/$1\\d*\-/go;
$vspec =~ s/\./\\\./go;
$vspec =~ s/\+/\\\+/go;
$vspec =~ s/\*/\.\*/go;