summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2012-05-07 15:56:19 +0000
committerMarc Espie <espie@cvs.openbsd.org>2012-05-07 15:56:19 +0000
commitadd7e6352eef58b1e16a485ac882114f4d696c5e (patch)
tree37b3ca02032e201de24a2abd147d76c6f18897fd /usr.sbin/pkg_add
parent139009895ce9e75d632b91c49c78ed988cc9c2a1 (diff)
well pkg_create itself doesn't care, but a custom ->annotate will get
very confused
Diffstat (limited to 'usr.sbin/pkg_add')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PkgCreate.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm b/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm
index cc9d21acce8..0086a4f876b 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.63 2012/05/01 14:24:16 espie Exp $
+# $OpenBSD: PkgCreate.pm,v 1.64 2012/05/07 15:56:18 espie Exp $
#
# Copyright (c) 2003-2010 Marc Espie <espie@openbsd.org>
#
@@ -900,7 +900,11 @@ sub read_fragments
if ($fast) {
next unless $s =~ m/^\@(?:cwd|lib|depend|wantlib)\b/o || $s =~ m/lib.*\.a$/o;
}
- $self->annotate(&$cont($s), $_, $file);
+ # XXX some things, like @comment no checksum, don't produce an object
+ my $o = &$cont($s);
+ if (defined $o) {
+ $self->annotate($o, $_, $file);
+ }
}
}
});