diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2014-01-25 10:18:39 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2014-01-25 10:18:39 +0000 |
commit | 7560d1eeac600d953cf3f3ebb5049761242c4d5c (patch) | |
tree | 713d93af06863fbcb964382053a870b2adcc46b0 /usr.sbin/pkg_add | |
parent | 449ef059d8d108e941affcfd869137956fe8a103 (diff) |
somehow, bytes got garbled. Be less cute and seek twice, that works.
sorry about that.
Diffstat (limited to 'usr.sbin/pkg_add')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PkgSign.pm | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PkgSign.pm b/usr.sbin/pkg_add/OpenBSD/PkgSign.pm index aaf68457a0b..5149aa94c02 100644 --- a/usr.sbin/pkg_add/OpenBSD/PkgSign.pm +++ b/usr.sbin/pkg_add/OpenBSD/PkgSign.pm @@ -1,6 +1,6 @@ #! /usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: PkgSign.pm,v 1.5 2014/01/23 22:57:06 espie Exp $ +# $OpenBSD: PkgSign.pm,v 1.6 2014/01/25 10:18:38 espie Exp $ # # Copyright (c) 2003-2014 Marc Espie <espie@openbsd.org> # @@ -99,7 +99,7 @@ sub sign_existing_package if (defined $pkg->{length} and $url =~ s/^file:// and open($fh, "<", $url) and $fh->seek($pkg->{length}, 0) and $fh->read($buffer, 2) - and $buffer eq "\x1f\x8b") { + and $buffer eq "\x1f\x8b" and $fh->seek($pkg->{length}, 0)) { #$state->say("FAST #1", $plist->pkgname); $wrarc->destdir($pkg->info); my $e = $wrarc->prepare('+CONTENTS'); @@ -109,7 +109,6 @@ sub sign_existing_package open(my $fh2, ">>", $tmp) or $state->fatal("Can't append to #1", $tmp); - print $fh2 "\x1f\x8b"; require File::Copy; File::Copy::copy($fh, $fh2) or $state->fatal("Error in copy #1", $!); |