aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@gmail.com>2014-03-25 22:37:49 +0000
committerPascal Terjan <pterjan@gmail.com>2014-03-25 22:37:49 +0000
commitb52260abf811704d8f8fb824c8218f54b2fd9cb1 (patch)
tree545ebcce4a2015164fac567342ef38a32879aa75
parente466557e13a03fc2f85a0f0f8941d9dbd6ea8e76 (diff)
downloadiurt-b52260abf811704d8f8fb824c8218f54b2fd9cb1.tar
iurt-b52260abf811704d8f8fb824c8218f54b2fd9cb1.tar.gz
iurt-b52260abf811704d8f8fb824c8218f54b2fd9cb1.tar.bz2
iurt-b52260abf811704d8f8fb824c8218f54b2fd9cb1.tar.xz
iurt-b52260abf811704d8f8fb824c8218f54b2fd9cb1.zip
Allow using --config-help with no repository configured
-rwxr-xr-xiurt23
1 files changed, 12 insertions, 11 deletions
diff --git a/iurt b/iurt
index c3ff175..b12405e 100755
--- a/iurt
+++ b/iurt
@@ -372,17 +372,6 @@ if ($run{repository}) {
$config->{repository} = $run{repository};
}
-if (!$config->{repository}) {
- die "FATAL $program_name: no repository have been defined (use --repository to specify one on the command line";
-}
-
-my $urpmi = Iurt::Urpmi->new(run => \%run, config => $config, urpmi_options => "-v --no-verify-rpm --nolock --auto --no-suggests --ignoresize $config->{urpmi_options}");
-$run{urpmi} = $urpmi;
-
-if (!$run{chrooted_urpmi} && $run{group}) {
- die "FATAL $program_name: option --chrooted-urpmi is mandatory if --group is selected";
-}
-
my %config_usage = (
admin => {
desc => 'Mail of the administrator of packages builds',
@@ -531,6 +520,18 @@ if ($run{config_usage}) {
config_usage(\%config_usage, $config);
exit;
};
+
+if (!$config->{repository}) {
+ die "FATAL $program_name: no repository have been defined (use --repository to specify one on the command line";
+}
+
+my $urpmi = Iurt::Urpmi->new(run => \%run, config => $config, urpmi_options => "-v --no-verify-rpm --nolock --auto --no-suggests --ignoresize $config->{urpmi_options}");
+$run{urpmi} = $urpmi;
+
+if (!$run{chrooted_urpmi} && $run{group}) {
+ die "FATAL $program_name: option --chrooted-urpmi is mandatory if --group is selected";
+}
+
$run{my_arch} or usage($program_name, \@params, "no architecture given (media $run{media}, run{my_arch} $run{my_arch}, todo", join(', ', @{$run{todo}}));
if (!$arch_comp{$real_arch}{$run{my_arch}}) {
die "FATAL $program_name: could not compile $run{my_arch} binaries on a $real_arch";