From 855139a22236ef3381d91e13dc6986f116f6d97e Mon Sep 17 00:00:00 2001 From: Andreas Barth Date: Fri, 1 Apr 2011 20:36:59 +0000 Subject: [PATCH] option parser: fix import and export options --- bin/wanna-build | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bin/wanna-build b/bin/wanna-build index 1f1006d..ba9af84 100755 --- a/bin/wanna-build +++ b/bin/wanna-build @@ -183,13 +183,15 @@ GetOptions( 'extra-conflicts=s' => \$extra_conflicts, # special actions - 'export' => sub { _set_mode(@_); $export_to = $_[1]; }, - 'import' => sub { _set_mode(@_); $import_from = $_[1]; }, + 'export=s' => sub { _set_mode(@_); $export_to = $_[1]; }, + 'import=s' => sub { _set_mode(@_); $import_from = $_[1]; }, 'manual-edit' => \&_set_mode, 'distribution-architectures' => \&_set_mode, 'distribution-aliases' => \&_set_mode, ) or usage(); $list_min_age = -1 * $list_max_age if $list_max_age; +print "export: $export_to\n"; +print "mode: $op_mode\n"; my $dbh; @@ -1280,7 +1282,7 @@ sub sort_list_func { sub calculate_prio { my $priomap = $yamlmap->{priority}; my $pkg = shift; - my @s=split("/", $pkg->{'section'}); + my @s=split("/", $pkg->{'section'}//""); $pkg->{'component'} = $s[0] if $s[1]; $pkg->{'component'} ||= 'main'; $pkg->{'calprio'} = 0; @@ -1564,6 +1566,7 @@ sub info_packages { } sub forget_packages { + no warnings; my( $name, $pkg, $key, $data ); foreach $name (@_) { -- 2.39.2