diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2014-01-23 11:52:58 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2014-01-23 11:52:58 +0000 |
commit | fbf712cc25a3cd7da25e5ca285811871f6d87259 (patch) | |
tree | 2a0d4b6f659b324a9209c81a189a28c68423bb64 | |
parent | 30c3b46de258c3bc6b2e0a9a130b06e8169e44c5 (diff) |
don't create cheap gzip archives if non signed, there's a better way.
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Signer.pm | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Signer.pm b/usr.sbin/pkg_add/OpenBSD/Signer.pm index e62891513ae..6e0c7642e68 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.1 2014/01/23 11:45:22 espie Exp $ +# $OpenBSD: Signer.pm,v 1.2 2014/01/23 11:52:57 espie Exp $ # # Copyright (c) 2003-2014 Marc Espie <espie@openbsd.org> # @@ -128,12 +128,7 @@ sub create_archive { my ($state, $filename, $dir) = @_; require IO::Compress::Gzip; - my $level = $state->{subst}->value('COMPRESSION_LEVEL'); - if (defined $state->{signer}) { - $level //= 6; - } else { - $level //= 1; - } + my $level = $state->{subst}->value('COMPRESSION_LEVEL') // 6; my $fh = IO::Compress::Gzip->new($filename, -Level => $level); return OpenBSD::Ustar->new($fh, $state, $dir); } |