summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD/PackageRepositoryList.pm
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2006-03-08 12:10:49 +0000
committerMarc Espie <espie@cvs.openbsd.org>2006-03-08 12:10:49 +0000
commita3e32db7620b275eb56225901bcdf80664dc16b6 (patch)
tree10ae29a35a18fdccc17596cdf482020bbfeec198 /usr.sbin/pkg_add/OpenBSD/PackageRepositoryList.pm
parent7e3e1895e51b34f7f91726c86c2f6cc25ac52ba4 (diff)
propagate stuff to be able to explicitly clean-up repositories.
(we can't use a normal destructor, since this will be called for each fork()ed subprocess).
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD/PackageRepositoryList.pm')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackageRepositoryList.pm10
1 files changed, 9 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackageRepositoryList.pm b/usr.sbin/pkg_add/OpenBSD/PackageRepositoryList.pm
index c6868ac4099..0b9734ef3d8 100644
--- a/usr.sbin/pkg_add/OpenBSD/PackageRepositoryList.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PackageRepositoryList.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: PackageRepositoryList.pm,v 1.1 2006/03/04 13:13:05 espie Exp $
+# $OpenBSD: PackageRepositoryList.pm,v 1.2 2006/03/08 12:10:47 espie Exp $
#
# Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org>
#
@@ -101,4 +101,12 @@ sub available
return keys %{$self->{avail}};
}
+sub cleanup
+{
+ my $self = shift;
+ for my $repo (@{$self->{list}}) {
+ $repo->cleanup();
+ }
+}
+
1;