diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2007-05-15 19:47:45 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2007-05-15 19:47:45 +0000 |
commit | ce668c2144f261f559a5281b8cad56bf46ee16ac (patch) | |
tree | 6c82fb5dfdde77002d707958c18732c1618a4de0 /usr.sbin/pkg_add | |
parent | 6b50c9ac4b6fc8f7f0274d94a7a8beeec7959cd7 (diff) |
allows for incomplete locations (without arch) and for repositories to
print PackageLocations (to be cleaned up later).
Diffstat (limited to 'usr.sbin/pkg_add')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackageLocation.pm | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackageLocation.pm b/usr.sbin/pkg_add/OpenBSD/PackageLocation.pm index 8fa9cea0ee9..b601d07ff98 100644 --- a/usr.sbin/pkg_add/OpenBSD/PackageLocation.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackageLocation.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: PackageLocation.pm,v 1.8 2007/05/14 17:11:05 espie Exp $ +# $OpenBSD: PackageLocation.pm,v 1.9 2007/05/15 19:47:44 espie Exp $ # # Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org> # @@ -32,6 +32,23 @@ sub new } my $self = { repository => $repository, name => $name, arch => $arch}; bless $self, $class; + print STDERR "Built location ", $self->stringize, "\n"; + return $self; + +} + +sub set_arch +{ + my ($self, $arch) = @_; + + $self->{arch} = $arch; +} + +sub stringize +{ + my $self = shift; + + return $self->{repository}->stringize($self->{name}); } sub openArchive |