summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2010-10-25 18:00:11 +0000
committerMarc Espie <espie@cvs.openbsd.org>2010-10-25 18:00:11 +0000
commit64f9cc4f19f73794b917ba7392b302b03c2e50be (patch)
treeea52bc376b762f776cd39b1d7821b7dde550ca06
parent3607cf6ef392fa38e060f7647ad2261df969610b (diff)
just bail out of producing empty files.
*this will become an error eventually, please fix those*
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PkgCreate.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm b/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm
index 1283234ab44..edc5895849c 100644
--- a/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm
@@ -1,6 +1,6 @@
#! /usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: PkgCreate.pm,v 1.24 2010/10/24 17:06:05 espie Exp $
+# $OpenBSD: PkgCreate.pm,v 1.25 2010/10/25 18:00:10 espie Exp $
#
# Copyright (c) 2003-2010 Marc Espie <espie@openbsd.org>
#
@@ -392,6 +392,11 @@ sub makesum_plist
my $dest = $self->source_to_dest;
my $out = $state->{base}.$self->cwd."/".$dest;
$self->format($state, $self->cwd."/".$dest);
+ if (-z $out) {
+ $state->errsay("groff produced empty result for #1", $dest);
+ $state->errsay("\tkeeping source manpage");
+ return $self->SUPER::makesum_plist($plist, $state);
+ }
my $e = OpenBSD::PackingElement::Manpage->add($plist, $dest);
$e->compute_checksum($e, $state, $state->{base});
}