From fbf712cc25a3cd7da25e5ca285811871f6d87259 Mon Sep 17 00:00:00 2001 From: Marc Espie Date: Thu, 23 Jan 2014 11:52:58 +0000 Subject: don't create cheap gzip archives if non signed, there's a better way. --- usr.sbin/pkg_add/OpenBSD/Signer.pm | 9 ++------- 1 file 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 # @@ -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); } -- cgit v1.2.3