]> git.donarmstrong.com Git - wannabuild.git/commitdiff
wanna-build/merge-v3: allow to specify source packages which are considered
authorAndreas Barth <aba@not.so.argh.org>
Sun, 6 Jun 2010 13:21:47 +0000 (13:21 +0000)
committerAndreas Barth <aba@not.so.argh.org>
Sun, 6 Jun 2010 13:21:47 +0000 (13:21 +0000)
to be installed/related unless they're (also) in the real source packages

triggers: do so for overlay suites (so that we could schedule binNMUs in testing)
and for secondary suites (so that we could binNMU unstable packages in
experimental; please note that this won't be useful before we get the
binNU-build-dependency code).

bin/wanna-build
triggers/common

index 02adc05510720f48d5a93d5a680d3e3b78fedd84..99bd7a26cc28861dc336120b32ed002d991b1656 100755 (executable)
@@ -497,7 +497,7 @@ sub process {
                /^merge-v3/ && do {
                         die "This operation is restricted to admin users\n"
                            if (defined @conf::admin_users and !isin( $real_user, @conf::admin_users) and !$simulate);
-                        # call with installed-packages+ . installed-sources+ [ . available-for-build-packages+ ]
+                        # call with installed-packages+ . installed-sources+ [ . available-for-build-packages* [ . consider-as-installed-source* ]  ]
                         # in case available-for-build-packages is not specified, installed-packages are used
                         lock_table() unless $simulate;
                         my $replacemap = { '%ARCH%' => $arch, '%SUITE%' => $distribution };
@@ -505,8 +505,16 @@ sub process {
                         my @ipkgs = &parse_argv( \@ARGV, '.');
                         my @isrcs = &parse_argv( \@ARGV, '.');
                         my @bpkgs = &parse_argv( \@ARGV, '.');
+                        my @psrcs = &parse_argv( \@ARGV, '.');
                         use WB::QD;
                         my $srcs = WB::QD::readsourcebins($arch, $Pas, \@isrcs, \@ipkgs);
+                        my $psrcs = WB::QD::readsourcebins($arch, $Pas, \@psrcs, []);
+                        foreach my $k (keys %$$psrcs) {
+                            next if $$srcs->{$k};
+                            my $pkg = $$psrcs->{$k};
+                            $pkg->{'status'} = 'related';
+                            $$srcs->{$k} = $pkg;
+                        }
                         parse_all_v3($$srcs);
                         @bpkgs = @ipkgs unless @bpkgs;
                         call_edos_depcheck( {'arch' => $arch, 'pkgs' => @bpkgs, 'srcs' => $$srcs, 'depwait' => 1 });
@@ -2935,10 +2943,10 @@ sub parse_all_v3() {
             $pkg->{'package'}  = $name;
         }
 
-        if ($pkgs->{'status'} eq 'installed' && $pkg->{'binary_nmu_version'} && $pkgs->{'binnmu'} < $pkg->{'binary_nmu_version'}) {
+        if (isin($pkgs->{'status'}, qw (installed, related)) && $pkg->{'binary_nmu_version'} && $pkgs->{'binnmu'} < $pkg->{'binary_nmu_version'}) {
                 $pkgs->{'status'} = 'out-of-date';
         }
-        if ($pkgs->{'status'} eq 'installed') {
+        if (isin($pkgs->{'status'}, qw (installed, related))) {
             if ($pkg->{'state'} ne 'Installed') {
                 change_state( \$pkg, 'Installed');
                 $pkg->{'version'} = $pkgs->{'version'};
@@ -2946,7 +2954,10 @@ sub parse_all_v3() {
                 $pkg->{'binary_nmu_version'} = $pkgs->{'binnmu'};
                 $pkg->{'section'} = $pkgs->{'section'};
                 $pkg->{'priority'} = $pkgs->{'priority'};
-                print "merge-v3: set $name ($arch) to installed\n" if $verbose || $simulate;
+                if (isin($pkgs->{'status'}, qw (related))) {
+                    $pkg->{'notes'} = "related";
+                }
+                print "merge-v3: set $name ($arch) to installed/".$pkg->{'notes'}."\n" if $verbose || $simulate;
                 log_ta( $pkg, "--merge-v3: installed" ) unless $simulate;
                 update_source_info($pkg) unless $simulate;
             }
index ffeb75224122fcfb2b9277e7e61f6ffe1b2f76b4..94a7eb6d0a6b4e2ff500c3496834065126fbcf04 100644 (file)
@@ -72,12 +72,12 @@ do_wb_merge_all() {
     then
         #wanna-build -v --merge-all --arch=$ARCH --dist=$WB_SUITE Packages.$SUITE.$ARCH-all quinn-$SUITE.$ARCH Sources.$SUITE-all
         # this currently makes the packages unknown to wanna-build. Perhaps we should keep them in pseudo-installed or so. Hm.
-        wanna-build -v --Pas ${PAS_FILE} --merge-v3 --arch=$ARCH --dist=$WB_SUITE Packages.$SUITE.$ARCH . Sources.$SUITE . Packages.$SUITE.$ARCH-all
+        wanna-build -v --Pas ${PAS_FILE} --merge-v3 --arch=$ARCH --dist=$WB_SUITE Packages.$SUITE.$ARCH . Sources.$SUITE . Packages.$SUITE.$ARCH-all . Sources.$SUITE-all
     fi
     if [ "$4" = "secondary" ]
     then
         #wanna-build -v --merge-all-secondary --arch=$ARCH --dist=$WB_SUITE Packages.$SUITE.$ARCH quinn-$SUITE.$ARCH Sources.$SUITE Packages.$SUITE.$ARCH-all
-        wanna-build -v --Pas ${PAS_FILE} --merge-v3 --arch=$ARCH --dist=$WB_SUITE Packages.$SUITE.$ARCH . Sources.$SUITE . Packages.$SUITE.$ARCH-all
+        wanna-build -v --Pas ${PAS_FILE} --merge-v3 --arch=$ARCH --dist=$WB_SUITE Packages.$SUITE.$ARCH . Sources.$SUITE . Packages.$SUITE.$ARCH-all . Sources.$SUITE-all
     fi
     echo "do_wb_merge_all $SUITE/$ARCH done"
 }