]> git.donarmstrong.com Git - wannabuild.git/blobdiff - bin/wanna-build
Fixes: Export format, forcibly clearing BD-Uninstallable
[wannabuild.git] / bin / wanna-build
index 22af9fef83478824ecde361d660406f70ce617bf..00ca7c46b30dabc73b6a2795f18d1914185b7020 100755 (executable)
@@ -978,6 +978,7 @@ sub add_one_needsbuild {
                        log_ta( $pkg, "--give-back" );
                        $db{$name} = $pkg;
                        print "$name: given back\n" if $verbose;
+                       return;
                }
                else {
                        print "$name: has uninstallable build-dependencies. Skipping\n",
@@ -2223,7 +2224,7 @@ sub write_db {
                                my $val = $ui->{$key};
                                 $val =~ s/\n*$//;
                                $val =~ s/^/ /mg;
-                               $val =~ s/^ $/ ./mg;
+                               $val =~ s/^ +$/ ./mg;
                                print F "$key: $val\n";
                            }
                            print F "\n";
@@ -2234,7 +2235,7 @@ sub write_db {
                                my $val = $pkg->{$key};
                                 $val =~ s/\n*$//;
                                $val =~ s/^/ /mg;
-                               $val =~ s/^ $/ ./mg;
+                               $val =~ s/^ +$/ ./mg;
                                print F "$key: $val\n";
                        }
                        print F "\n";
@@ -2643,6 +2644,7 @@ sub call_edos_depcheck {
        my $change = 
            (defined $interesting_packages{$key} and $pkg->{'State'} eq 'Needs-Build') ||
            (not defined $interesting_packages{$key} and $pkg->{'State'} eq 'BD-Uninstallable');
+       my $problemchange = $interesting_packages{$key} ne $pkg->{'BD-Problem'};
        if ($change) {
            if (defined $interesting_packages{$key}) {
                    change_state( \$pkg, 'BD-Uninstallable' );
@@ -2650,10 +2652,19 @@ sub call_edos_depcheck {
            } else {
                    change_state( \$pkg, 'Needs-Build' );
            }
+       }
+       if ($problemchange) {
+           if (defined $interesting_packages{$key}) {
+                   $pkg->{'BD-Problem'} = $interesting_packages{$key};
+           }   
+       }
+       if ($change) {
            log_ta( $pkg, "--merge-all" );
-           $db{$key} = $pkg;
            print "edos-builddebchange changed state of ${key}_$pkg->{'Version'} to $pkg->{'State'}\n" if $verbose;
        }
+       if ($change || $problemchange) {
+           $db{$key} = $pkg;
+       }
     }
 }
 
@@ -2679,7 +2690,10 @@ Options:
          a new version number (source-version + "+b<num>")
     --give-back: Mark a package as ready to build that is in state Building,
         Built or Build-Attempted. To give back a package in state Failed, use
-        --override
+        --override. This command will actually put the package in state
+        BD-Uninstallable, until the installability of its Build-Dependencies
+        were verified. This happens at each call of --merge-all, usually
+        every 15 minutes.
     --merge-quinn: Merge quinn-diff output into database.
     --merge-packages: Merge Packages files into database.
     --pretend-avail: Pretend that given packages are available now and give
@@ -2701,7 +2715,7 @@ Options:
     --export FILE: Export database to a ASCII file FILE
     --lock-for PID: Locks the database for the process with this pid
     --unlock-for PID: Unlocks the database for the process with this pid
-    --act-on-behalf-of PID: Ignores the log (if it is held by this pid)
+    --act-on-behalf-of PID: Ignores the lock (if it is held by this pid)
     --start-transaction: Creates a copy of the state of the database, for
        use with --transactional. This overrides any previous uncommited
        transaction. Should only be used after --lock-for