diff options
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackingElement.pm | 5 | ||||
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackingList.pm | 8 |
2 files changed, 11 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm index 154d0f2cd8e..f45af6b2ab1 100644 --- a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm @@ -1,4 +1,4 @@ -# $OpenBSD: PackingElement.pm,v 1.2 2003/10/31 17:43:20 espie Exp $ +# $OpenBSD: PackingElement.pm,v 1.3 2003/11/06 17:46:35 espie Exp $ # # Copyright (c) 2003 Marc Espie. # @@ -408,6 +408,9 @@ sub destate { my ($self, $state) = @_; $state->{cwd} = $self->{name}; + if (!defined $state->{prefix}) { + $state->{prefix} = $state->{cwd}; + } } package OpenBSD::PackingElement::Owner; diff --git a/usr.sbin/pkg_add/OpenBSD/PackingList.pm b/usr.sbin/pkg_add/OpenBSD/PackingList.pm index 28b4e10851c..c05e5936ac5 100644 --- a/usr.sbin/pkg_add/OpenBSD/PackingList.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackingList.pm @@ -1,4 +1,4 @@ -# $OpenBSD: PackingList.pm,v 1.2 2003/10/19 18:42:55 espie Exp $ +# $OpenBSD: PackingList.pm,v 1.3 2003/11/06 17:46:35 espie Exp $ # # Copyright (c) 2003 Marc Espie. # @@ -146,6 +146,12 @@ sub pkgname($) return $self->{name}->{name}; } +sub prefix($) +{ + my $self = shift; + return $self->{state}->{prefix}; +} + # allows the autoloader to work correctly sub DESTROY { |