summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2007-05-04 19:40:38 +0000
committerMarc Espie <espie@cvs.openbsd.org>2007-05-04 19:40:38 +0000
commit62490c73850c7ea436ce504d4c270d7627772820 (patch)
treea9f1fdc8a563c2274aa78ab9b656adf180928ca8
parente3d438608f212120e42a6447bf89f354816ac4ff (diff)
move some checks after -q/-Q so that plists can still be printed.
problem noticed by Bernd.
-rw-r--r--usr.sbin/pkg_add/pkg_create26
1 files changed, 14 insertions, 12 deletions
diff --git a/usr.sbin/pkg_add/pkg_create b/usr.sbin/pkg_add/pkg_create
index 4d31162e494..2809a8450ec 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.88 2007/05/03 14:49:56 espie Exp $
+# $OpenBSD: pkg_create,v 1.89 2007/05/04 19:40:37 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -597,11 +597,6 @@ if (defined $opt_B) {
$base = $ENV{'PKG_PREFIX'};
}
-if ($plist->{deprecated}) {
- print STDERR "Error: found obsolete constructs\n";
- exit 1;
-}
-
unless (defined $opt_q && defined $opt_n) {
if ($regen_package) {
@@ -613,12 +608,6 @@ unless (defined $opt_q && defined $opt_n) {
}
}
-$plist->avert_duplicates_and_other_checks({});
-
-if ($errors) {
- exit 1;
-}
-
if (!defined $plist->{name}) {
print STDERR "Can't write unnamed packing list\n";
exit 1;
@@ -632,6 +621,19 @@ if (defined $opt_q) {
}
exit 0 if defined $opt_n;
}
+
+if ($plist->{deprecated}) {
+ print STDERR "Error: found obsolete constructs\n";
+ exit 1;
+}
+
+$plist->avert_duplicates_and_other_checks({});
+
+if ($errors) {
+ exit 1;
+}
+
+
my $wname;
if ($regen_package) {
$wname = $plist->pkgname.".tgz";