aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-05-22 16:41:52 +0000
committerThierry Vignaud <tv@mandriva.org>2007-05-22 16:41:52 +0000
commit7427d4349bfd1c4c600ad98d414b4dcc016e59fd (patch)
tree77c6f62df6e78033998dc877d7949af4787af2fc
parenta0ed6dec72f01714a994fd8a5999fddc4281cec6 (diff)
downloadrpmdrake-7427d4349bfd1c4c600ad98d414b4dcc016e59fd.tar
rpmdrake-7427d4349bfd1c4c600ad98d414b4dcc016e59fd.tar.gz
rpmdrake-7427d4349bfd1c4c600ad98d414b4dcc016e59fd.tar.bz2
rpmdrake-7427d4349bfd1c4c600ad98d414b4dcc016e59fd.tar.xz
rpmdrake-7427d4349bfd1c4c600ad98d414b4dcc016e59fd.zip
workaround crash due to option abuse (#30817)
-rwxr-xr-xRpmdrake/init.pm7
1 files changed, 7 insertions, 0 deletions
diff --git a/Rpmdrake/init.pm b/Rpmdrake/init.pm
index d01c36a4..98c3db64 100755
--- a/Rpmdrake/init.pm
+++ b/Rpmdrake/init.pm
@@ -98,6 +98,13 @@ foreach (@ARGV) {
}
}
+foreach my $option (qw(media mode parallel pkg-nosel pkg-sel search)) {
+ if (defined $options{$option} && !ref($options{$option})) {
+ warn "wrong usage of \"$option\" option!\n";
+ exit(-1); # too early for my_exit()
+ }
+}
+
our $MODE = ref $options{mode} ? $options{mode}[0] : undef;
unless ($MODE) {
$MODE = 'install';