]> git.donarmstrong.com Git - wannabuild.git/commitdiff
rollback
authorAndreas Barth <aba@not.so.argh.org>
Thu, 17 Jun 2010 20:10:12 +0000 (20:10 +0000)
committerAndreas Barth <aba@not.so.argh.org>
Thu, 17 Jun 2010 20:10:12 +0000 (20:10 +0000)
    commit c44876928c07326581b0b4588c4a5e62e892750c
    commit cb018bafa2daf315b94f07b5adcad1d59292ade0
till we do it proper

bin/wanna-build
lib/WB/QD.pm
tests/qd.pl

index 18822532e8eaa04c00bd1de047147924cecf7af5..2058f0616b102e7c7c1eeb105de8606e3e9b50eb 100755 (executable)
@@ -616,7 +616,6 @@ sub add_one_building {
 
        $ok = 1;
        my $pkg = get_source_info($name);
-        $pkg->{'version'} =~ s/\+b[0-9]+$//;
        if (defined($pkg)) {
                if ($pkg->{'state'} eq "Not-For-Us") {
                        $ok = 0;
@@ -775,7 +774,6 @@ sub add_one_attempted {
                print "$name: not registered yet.\n";
                return;
        }
-        $pkg->{'version'} =~ s/\+b[0-9]+$//;
 
        if (($pkg->{'state'} ne "Building") && ($pkg->{'state'} ne "Build-Attempted")) {
                print "$name: not taken for building (state is $pkg->{'state'}). ",
@@ -808,7 +806,6 @@ sub add_one_built {
                print "$name: not registered yet.\n";
                return;
        }
-        $pkg->{'version'} =~ s/\+b[0-9]+$//;
 
         if (($pkg->{'state'} ne "Building") && ($pkg->{'state'} ne "Build-Attempted")) {
                print "$name: not taken for building (state is $pkg->{'state'}). ",
@@ -840,7 +837,6 @@ sub add_one_uploaded {
                print "$name: not registered yet.\n";
                return;
        }
-        $pkg->{'version'} =~ s/\+b[0-9]+$//;
 
        if ($pkg->{'state'} eq "Uploaded" &&
                pkg_version_eq($pkg,$version)) {
@@ -890,7 +886,6 @@ sub add_one_failed {
                print "$name: not registered yet.\n";
                return;
        }
-        $pkg->{'version'} =~ s/\+b[0-9]+$//;
        $state = $pkg->{'state'};
 
        if ($state eq "Not-For-Us") {
@@ -979,7 +974,6 @@ sub add_one_notforus {
        my $name = shift;
        my $version = shift;
        my $pkg = get_source_info($name);
-        $pkg->{'version'} =~ s/\+b[0-9]+$//;
 
        if ($pkg->{'state'} eq 'Not-For-Us') {
                # reset Not-For-Us state in case it's called twice; this is
@@ -1036,7 +1030,6 @@ sub add_one_needsbuild {
                print "$name: not registered; can't give back.\n";
                return;
        }
-        $pkg->{'version'} =~ s/\+b[0-9]+$//;
        $state = $pkg->{'state'};
 
        if ($state eq "BD-Uninstallable") {
@@ -1114,7 +1107,6 @@ sub set_one_binnmu {
                print "$name: not registered; can't register for binNMU.\n";
                return;
        }
-        $pkg->{'version'} =~ s/\+b[0-9]+$//;
        my $db_ver = $pkg->{'version'};
 
        if (!version_eq($db_ver, $version)) {
@@ -1190,7 +1182,6 @@ sub set_one_buildpri {
                print "$name: not registered; can't set priority.\n";
                return;
        }
-        $pkg->{'version'} =~ s/\+b[0-9]+$//;
        $state = $pkg->{'state'};
 
        if ($state eq "Not-For-Us") {
@@ -1229,7 +1220,6 @@ sub add_one_depwait {
                print "$name: not registered yet.\n";
                return;
        }
-        $pkg->{'version'} =~ s/\+b[0-9]+$//;
        $state = $pkg->{'state'};
 
        if ($state eq "Dep-Wait") {
@@ -2031,7 +2021,6 @@ sub list_packages {
        my $db = get_all_source_info(state => $state, user => $user, category => $category, list_min_age => $list_min_age);
        foreach $name (keys %$db) {
                next if $name =~ /^_/;
-                $db->{$name}->{'version'} =~ s/\+b[0-9]+$//;
                push @list, calculate_prio($db->{$name});
        }
 
@@ -2962,7 +2951,9 @@ sub parse_all_v3() {
             $pkg->{'package'}  = $name;
         }
         my $logstr = "merge-v3 $vars->{'time'} ".$name."_$pkgs->{'version'}".
-            " ($vars->{'arch'}, $vars->{'suite'}, previous: $pkg->{'version'}".
+            ($pkgs->{'binnmu'} ? ";b".$pkgs->{'binnmu'} : "").
+            "($vars->{'arch'}, $vars->{'suite'}, previous: $pkg->{'version'}".
+            ($pkg->{'binary_nmu_version'} ? ";b".$pkg->{'binary_nmu_version'} : "").
             ", $pkg->{'state'}):";
 
         if (isin($pkgs->{'status'}, qw (installed related)) && $pkg->{'binary_nmu_version'} && $pkgs->{'binnmu'} < int($pkg->{'binary_nmu_version'})) {
@@ -2973,21 +2964,15 @@ sub parse_all_v3() {
             if ($pkg->{'state'} ne 'Installed') {
                 change_state( \$pkg, 'Installed');
                 delete $pkg->{'depends'};
-                delete $pkg->{'binary_nmu_version'};
-                # delete $pkg->{'binary_nmu_changelog'}; - we keep the changelog for now in case there are bugs; activate in August 2010 or later
                 $change++;
             }
-            my $attrs = { 'version' => 'version', 'installed_version' => 'version', 'section' => 'section', 'priority' => 'priority' };
+            my $attrs = { 'version' => 'version', 'installed_version' => 'version', 'binary_nmu_version' => 'binnmu', 'section' => 'section', 'priority' => 'priority' };
             foreach my $k (keys %$attrs) {
                 if ($pkg->{$k} ne $pkgs->{$attrs->{$k}}) {
                     $pkg->{$k} = $pkgs->{$attrs->{$k}};
                     $change++;
                 }
             }
-            if ($pkg->{'binary_nmu_version'}) { # cleanup only
-                delete $pkg->{'binary_nmu_version'};
-                $change++;
-            }
             if (isin($pkgs->{'status'}, qw (related)) and $pkg->{'notes'} ne "related") {
                 $pkg->{'notes'} = "related";
                 $change++;
index 16b030639a415dac11be23256c38fe473a82d43f..d5cefb328ea9388ec4c774ac0249a67e5c8e36e7 100644 (file)
@@ -97,8 +97,9 @@ sub readsourcebins {
         delete $srcs->{$k}->{'compiled'};
         $srcs->{$k}->{'status'} = 'installed' if $srcs->{$k}->{'arch'} && $srcs->{$k}->{'arch'} eq 'all';
 
-        $srcs->{$k}->{'version'} = $srcs->{$k}->{'version'}."+b".$srcs->{$k}->{'binnmu'} if $srcs->{$k}->{'binnmu'};
-
+        #my $p = $pas->{$k};
+        #$p ||= $pas->{'%'.$k};
+        #$srcs->{$k}->{'status'} = 'not-for-us' if pasignore($p, $arch);
         if (pasignore($pas->{'%'.$k}, $arch)) {
             $srcs->{$k}->{'status'} = 'not-for-us';
             next;
index 8bd0701831665da8274701b16094631edfd85294..9a4ceabc5fb26ecc9102260afa0daf50f3bb2b6e 100755 (executable)
@@ -137,7 +137,7 @@ is_deeply ($$srcs, {
             'bash' => {
                         'priority' => 'required',
                         'status' => 'installed',
-                        'version' => '4.1-3+b2',
+                        'version' => '4.1-3',
                         'name' => 'bash',
                         'section' => 'shell',
                         'binnmu' => '2',