diff options
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD/PackingElement.pm')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackingElement.pm | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm index ccbbeb57d93..24edaa23654 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.207 2012/07/12 08:57:02 espie Exp $ +# $OpenBSD: PackingElement.pm,v 1.208 2012/10/13 10:28:22 jeremy Exp $ # # Copyright (c) 2003-2010 Marc Espie <espie@openbsd.org> # @@ -1863,6 +1863,17 @@ sub new }, $class; } +sub fullpkgpath +{ + my ($self) = @_; + if(%{$self->{mandatory}}) { + my $m = join(",", keys %{$self->{mandatory}}); + return "$self->{dir},$m"; + } else { + return $self->{dir}; + } +} + # a pkgpath has a dir, and some flavors/multi parts. To match, we must # remove them all. So, keep a full hash of everything we have (has), and # when stuff $to_rm matches, remove them from $from. |