summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorespie <espie@openbsd.org>2007-05-15 19:47:44 +0000
committerespie <espie@openbsd.org>2007-05-15 19:47:44 +0000
commitc59c0783c0489547f6802f25539e24572680717e (patch)
tree24290cf5784b74ab8230ebbdc78298d6fe6be818
parentdon't assume 4-byte aligned memory when intercepting a string (diff)
downloadwireguard-openbsd-c59c0783c0489547f6802f25539e24572680717e.tar.xz
wireguard-openbsd-c59c0783c0489547f6802f25539e24572680717e.zip
allows for incomplete locations (without arch) and for repositories to
print PackageLocations (to be cleaned up later).
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackageLocation.pm19
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