diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2007-05-12 15:19:01 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2007-05-12 15:19:01 +0000 |
commit | 2a4119d949ae6b146b508de15393b07048f128d0 (patch) | |
tree | b74bbd479b628b8dc298ce9bfc727c70adbbdc3d /usr.sbin/pkg_add/OpenBSD/PackingElement.pm | |
parent | 2491cf3ea853b2d89c8d2d9dcae5fdfb6c6e6f2b (diff) |
lift PkgSpec creation up into PackingElement::Dependency.
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD/PackingElement.pm')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackingElement.pm | 12 |
1 files changed, 11 insertions, 1 deletions
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); |