diff options
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Dependencies.pm | 5 | ||||
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackingElement.pm | 12 |
2 files changed, 13 insertions, 4 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Dependencies.pm b/usr.sbin/pkg_add/OpenBSD/Dependencies.pm index a96ea62197b..02433f8d5f2 100644 --- a/usr.sbin/pkg_add/OpenBSD/Dependencies.pm +++ b/usr.sbin/pkg_add/OpenBSD/Dependencies.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Dependencies.pm,v 1.20 2007/05/12 14:38:30 espie Exp $ +# $OpenBSD: Dependencies.pm,v 1.21 2007/05/12 15:19:00 espie Exp $ # # Copyright (c) 2005-2007 Marc Espie <espie@openbsd.org> # @@ -21,7 +21,6 @@ use warnings; package OpenBSD::Dependencies; use OpenBSD::PackageName; -use OpenBSD::PkgSpec; use OpenBSD::PackageInfo; use OpenBSD::SharedLibs; use OpenBSD::Error; @@ -59,7 +58,7 @@ sub solve my @deps; for my $dep (@{$plist->{depend}}) { - my $spec = OpenBSD::PkgSpec->new($dep->{pattern}); + my $spec = $dep->spec; if ($state->{replace}) { my $v = find_candidate($spec, keys %{$to_install}); if ($v) { diff --git a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm index 4cc8f2a1439..ff504eac1ac 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.104 2007/05/12 14:48:45 espie Exp $ +# $OpenBSD: PackingElement.pm,v 1.105 2007/05/12 15:19:00 espie Exp $ # # Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org> # @@ -671,6 +671,16 @@ sub stringize($) return $self->{pkgpath}.':'.$self->{pattern}.':'.$self->{def}; } +sub spec +{ + my $self = shift; + if (!defined $self->{spec}) { + require OpenBSD::PkgSpec; + $self->{spec} = OpenBSD::PkgSpec->new($self->{pattern}); + } + return $self->{spec}; +} + package OpenBSD::PackingElement::Wantlib; our @ISA=qw(OpenBSD::PackingElement::Depend); |