]> git.donarmstrong.com Git - wannabuild.git/blobdiff - bin/wanna-build
Revert commit to use the common list of arches, it's listed in a fixed order in the...
[wannabuild.git] / bin / wanna-build
index 9ef78632054ead7ea732c9e12e7faa3e4bdcf61e..d3faced3acc6a955e3c297c9205ae88d6d87a547 100755 (executable)
@@ -64,7 +64,7 @@ use Dpkg::Deps; # TODO: same
 
 our ($verbose, $mail_logs, $list_order, $list_state,
     $curr_date, $op_mode, $user, $real_user, $distribution,
-    $fail_reason, $opt_override, $import_from, $export_to, $opt_create_db,
+    $fail_reason, $opt_override, $import_from, $export_to,
     %prioval, %sectval,
     $info_all_dists, $arch,
     $short_date, $list_min_age, $list_max_age, $dbbase, @curr_time,
@@ -106,7 +106,6 @@ GetOptions(
     },
     'verbose|v'       => \$verbose,
     'override|o'      => \$opt_override,
-    'create-db'       => \$opt_create_db,
     'correct-compare' => \$WannaBuild::opt_correct_version_cmp,
 
     # TODO: remove after buildds no longer pass to wanna-build
@@ -151,6 +150,7 @@ GetOptions(
                   reupload-wait bd-uninstallable ) ];
     },
     'dist|d=s' => sub {
+        $distribution = $_[1];
         given ( $_[1] ) {
             when ( [qw< a all >] ) {
                 $info_all_dists = 1;
@@ -183,8 +183,8 @@ 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,
@@ -1280,7 +1280,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;
@@ -1459,6 +1459,7 @@ sub list_packages {
         undef $printformat if ($ownprintformat && $ownprintformat eq 'none');
 
        foreach $pkg (sort sort_list_func @list) {
+                no warnings;
                 if ($printformat) {
                     print print_format($printformat, $pkg, {'cnt' => $cnt, 'scnt' => \%scnt})."\n";
                    ++$cnt;
@@ -1564,6 +1565,7 @@ sub info_packages {
 }
 
 sub forget_packages {
+        no warnings;
        my( $name, $pkg, $key, $data );
        
        foreach $name (@_) {
@@ -2375,6 +2377,8 @@ sub parse_all_v3 {
             }
             $pkg->{'package'}  = $name;
         }
+        $pkg->{'version'} ||= "";
+        $pkg->{'state'} ||= "";
         my $logstr = sprintf("merge-v3 %s %s_%s", $vars->{'time'}, $name, $pkgs->{'version'}).
             ($pkgs->{'binnmu'} ? ";b".$pkgs->{'binnmu'} : "").
             sprintf(" (%s, %s, previous: %s", $vars->{'arch'}, $vars->{'suite'}, $pkg->{'version'}//"").