summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2014-02-08 11:07:34 +0000
committerMarc Espie <espie@cvs.openbsd.org>2014-02-08 11:07:34 +0000
commit0636cc72a45e06e763b6051ec7939f91c11e5239 (patch)
treea57dad534b9baa9def8481ff44be86c54d474d3e /usr.sbin/pkg_add/OpenBSD
parent42676d758bb4e99e64200d0ae8fdf3e5a7edf717 (diff)
also limit the number of currently opened packages locally: each uncompress
gobbles memory. (this was probably already an issue with external gunzip, but not THAT visible because of separate processes).
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackageRepository.pm14
1 files changed, 13 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm b/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm
index f1437ea2f4a..2ae64c79215 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.107 2014/02/07 14:06:43 espie Exp $
+# $OpenBSD: PackageRepository.pm,v 1.108 2014/02/08 11:07:33 espie Exp $
#
# Copyright (c) 2003-2010 Marc Espie <espie@openbsd.org>
#
@@ -374,6 +374,18 @@ sub may_exist
return -r $self->relative_url($name);
}
+my $local = [];
+
+sub opened
+{
+ return $local;
+}
+
+sub maxcount
+{
+ return 3;
+}
+
sub list
{
my $self = shift;