diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2007-05-03 12:17:26 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2007-05-03 12:17:26 +0000 |
commit | ba25218838f2f092bf81d02ca3c493ecdf70d704 (patch) | |
tree | c54af31ad6cbb801ee8656d178b23bca02e488f6 /usr.sbin | |
parent | bf1011e0a32b4028dd738f6268b438c5331684c3 (diff) |
fix creation of packing-list for package regeneration
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pkg_add/pkg_create | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/usr.sbin/pkg_add/pkg_create b/usr.sbin/pkg_add/pkg_create index e5a7a8dc545..8eee85e4b69 100644 --- a/usr.sbin/pkg_add/pkg_create +++ b/usr.sbin/pkg_add/pkg_create @@ -1,6 +1,6 @@ #! /usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: pkg_create,v 1.86 2007/05/03 12:14:36 espie Exp $ +# $OpenBSD: pkg_create,v 1.87 2007/05/03 12:17:25 espie Exp $ # # Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org> # @@ -510,6 +510,8 @@ if ($regen_package) { } else { $infodir = dirname($contents[0]); } + $plist->fromfile($contents[0]) or + Fatal "Can't read packing list $contents[0]"; } else { print "Creating package $ARGV[0]\n" if !(defined $opt_q) && $opt_v; $infodir = OpenBSD::Temp::dir() unless $opt_q; @@ -555,12 +557,12 @@ if ($regen_package) { OpenBSD::PackingElement::ExtraInfo->add($plist, $fullpkgpath, $cdrom, $ftp); } + for my $contentsfile (@contents) { + read_fragments($plist, $contentsfile) or + Fatal "Can't read packing list $contentsfile"; + } } -for my $contentsfile (@contents) { - read_fragments($plist, $contentsfile) or - Fatal "Can't open packing list $contentsfile"; -} my $base = '/'; if (defined $opt_B) { |