summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2007-05-30 11:04:32 +0000
committerMarc Espie <espie@cvs.openbsd.org>2007-05-30 11:04:32 +0000
commit0a67e1516126d6a5238b91d1fda5969be4b21262 (patch)
treea06e8bfdb43b51aab858353c3fae13c0da32519b /usr.sbin/pkg_add/OpenBSD
parent79c4abd2d3fa42608583a3969a456626ef26fa86 (diff)
move close methods so that error paths can proceed on Repository::Installed.
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackageRepository.pm26
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackageRepository/Installed.pm30
2 files changed, 30 insertions, 26 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm b/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm
index da1296893bf..e06d82521d6 100644
--- a/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: PackageRepository.pm,v 1.38 2007/05/19 09:18:55 espie Exp $
+# $OpenBSD: PackageRepository.pm,v 1.39 2007/05/30 11:04:31 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -117,30 +117,6 @@ sub close
$object->deref();
}
-sub finish_and_close
-{
- my ($self, $object) = @_;
- $self->close($object);
-}
-
-sub close_now
-{
- my ($self, $object) = @_;
- $self->close($object, 0);
-}
-
-sub close_after_error
-{
- my ($self, $object) = @_;
- $self->close($object, 1);
-}
-
-sub close_with_client_error
-{
- my ($self, $object) = @_;
- $self->close($object, 1);
-}
-
sub make_room
{
my $self = shift;
diff --git a/usr.sbin/pkg_add/OpenBSD/PackageRepository/Installed.pm b/usr.sbin/pkg_add/OpenBSD/PackageRepository/Installed.pm
index d07e6bdcc00..b3515e4fbae 100644
--- a/usr.sbin/pkg_add/OpenBSD/PackageRepository/Installed.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PackageRepository/Installed.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Installed.pm,v 1.10 2007/05/19 09:45:33 espie Exp $
+# $OpenBSD: Installed.pm,v 1.11 2007/05/30 11:04:31 espie Exp $
#
# Copyright (c) 2007 Marc Espie <espie@openbsd.org>
#
@@ -54,6 +54,30 @@ sub url
return $self->urlscheme.':'.$self->relative_url($name);
}
+sub finish_and_close
+{
+ my ($self, $object) = @_;
+ $self->close($object);
+}
+
+sub close_now
+{
+ my ($self, $object) = @_;
+ $self->close($object, 0);
+}
+
+sub close_after_error
+{
+ my ($self, $object) = @_;
+ $self->close($object, 1);
+}
+
+sub close_with_client_error
+{
+ my ($self, $object) = @_;
+ $self->close($object, 1);
+}
+
package OpenBSD::PackageRepository::Installed;
our @ISA = (qw(OpenBSD::PackageRepositoryBase));
@@ -80,6 +104,10 @@ sub relative_url
return $name or '';
}
+sub close
+{
+}
+
sub find
{
my ($repository, $name, $arch) = @_;