summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2004-11-11 22:40:39 +0000
committerMarc Espie <espie@cvs.openbsd.org>2004-11-11 22:40:39 +0000
commitd115ee763651afa578357d767e39e3168fc2303b (patch)
tree5888022974a1845d7ef94b837dd6dcd2a40bb240 /usr.sbin
parenta37d85e89e128a9e5430cb870da74b986c4c6994 (diff)
forget packing-lists after deleting the package (avoid out-of-memory error
when deleting large sets of packages).
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Delete.pm3
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Update.pm5
2 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Delete.pm b/usr.sbin/pkg_add/OpenBSD/Delete.pm
index b99f3b63dca..d306666bfba 100644
--- a/usr.sbin/pkg_add/OpenBSD/Delete.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Delete.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Delete.pm,v 1.8 2004/11/11 11:51:53 espie Exp $
+# $OpenBSD: Delete.pm,v 1.9 2004/11/11 22:40:38 espie Exp $
#
# Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org>
#
@@ -139,6 +139,7 @@ sub delete_plist
$removed->{$name} = 1;
}
remove_packing_info($dir) unless $state->{not};
+ $plist->forget();
}
package OpenBSD::PackingElement;
diff --git a/usr.sbin/pkg_add/OpenBSD/Update.pm b/usr.sbin/pkg_add/OpenBSD/Update.pm
index b75eb273928..9e2092f62de 100644
--- a/usr.sbin/pkg_add/OpenBSD/Update.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Update.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Update.pm,v 1.25 2004/11/11 20:59:05 espie Exp $
+# $OpenBSD: Update.pm,v 1.26 2004/11/11 22:40:38 espie Exp $
#
# Copyright (c) 2004 Marc Espie <espie@openbsd.org>
#
@@ -77,7 +77,8 @@ sub extract
if ($state->{not}) {
print "extracting tempfile under ", dirname($file->{destdir}.$file->{name}), "\n";
} else {
- my ($fh, $tempname) = tempfile(DIR => dirname($file->{destdir}.$file->{name}));
+ my ($fh, $tempname) = tempfile('pkg.XXXXXXXXXX',
+ DIR => dirname($file->{destdir}.$file->{name}));
print "extracting $tempname\n" if $state->{very_verbose};
$file->{name} = $tempname;