summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2014-01-23 13:09:44 +0000
committerMarc Espie <espie@cvs.openbsd.org>2014-01-23 13:09:44 +0000
commit2fe27d3b76ba24e80d6f2a134983a8252fea5b4d (patch)
treecd5a9623b7b4744b6d34cf0b0def6f442ac99b3f /usr.sbin/pkg_add
parentbdad71715cbbcec77c0bd30c2ab86815434bba2f (diff)
new interface to be able to manipulate output better
Diffstat (limited to 'usr.sbin/pkg_add')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Signer.pm12
1 files changed, 11 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Signer.pm b/usr.sbin/pkg_add/OpenBSD/Signer.pm
index 6e0c7642e68..2f878371807 100644
--- a/usr.sbin/pkg_add/OpenBSD/Signer.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Signer.pm
@@ -1,6 +1,6 @@
#! /usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: Signer.pm,v 1.2 2014/01/23 11:52:57 espie Exp $
+# $OpenBSD: Signer.pm,v 1.3 2014/01/23 13:09:43 espie Exp $
#
# Copyright (c) 2003-2014 Marc Espie <espie@openbsd.org>
#
@@ -130,9 +130,19 @@ sub create_archive
require IO::Compress::Gzip;
my $level = $state->{subst}->value('COMPRESSION_LEVEL') // 6;
my $fh = IO::Compress::Gzip->new($filename, -Level => $level);
+ $state->{archive_filename} = $filename;
return OpenBSD::Ustar->new($fh, $state, $dir);
}
+sub new_gstream
+{
+ my $state = shift;
+ close($state->{archive}{fh});
+ my $level = $state->{subst}->value('COMPRESSION_LEVEL') // 6;
+ $state->{archive}{fh} =IO::Compress::Gzip->new(
+ $state->{archive_filename}, -Level => $level, -Append => 1);
+}
+
sub add_signature
{
my ($state, $plist) = @_;