diff options
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD/PackageName.pm')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackageName.pm | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackageName.pm b/usr.sbin/pkg_add/OpenBSD/PackageName.pm index 726efefaef6..09de0d3d009 100644 --- a/usr.sbin/pkg_add/OpenBSD/PackageName.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackageName.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: PackageName.pm,v 1.19 2007/05/13 12:55:54 espie Exp $ +# $OpenBSD: PackageName.pm,v 1.20 2007/05/13 13:12:21 espie Exp $ # # Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org> # @@ -317,6 +317,27 @@ sub split return $class->new(OpenBSD::PackageName::splitstem($pkgname)); } +sub match_repo +{ + my ($self, $o) = @_; + return $o->stemlist->findstem($o->{stem}); +} + +package OpenBSD::PackageName::PartialStem; +our @ISA=(qw(OpenBSD::PackageName::PartialStem)); + +sub to_pattern +{ + my $o = shift; + return '*.'.$o->{stem}.'*-*'; +} + +sub match_repo +{ + my ($self, $o) = @_; + return $o->stemlist->find_partialstem($o->{stem}); +} + package OpenBSD::PackageName::Name; sub to_string { |