diff options
author | Pascal Terjan <pterjan@mandriva.org> | 2009-12-02 18:52:09 +0000 |
---|---|---|
committer | Pascal Terjan <pterjan@mandriva.org> | 2009-12-02 18:52:09 +0000 |
commit | 6d24aac8c753da218e1d321541afe959f137acfd (patch) | |
tree | e976f48a1c1f12a4fd6b1e0fbf2328ce4d026652 | |
parent | 1a3de3d9cddc23c4040fd6cc804da397bc11c311 (diff) | |
download | iurt-6d24aac8c753da218e1d321541afe959f137acfd.tar iurt-6d24aac8c753da218e1d321541afe959f137acfd.tar.gz iurt-6d24aac8c753da218e1d321541afe959f137acfd.tar.bz2 iurt-6d24aac8c753da218e1d321541afe959f137acfd.tar.xz iurt-6d24aac8c753da218e1d321541afe959f137acfd.zip |
Allow rebuilding all the media
-rwxr-xr-x | iurt2 | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -206,6 +206,9 @@ $run{todo} = []; [ "m", "media", -1, "<media 1> <media 2> ... <media 3>", "Media to rebuild", sub { ($run{media}) = @_; 1 }, "Adding a media to rebuild" ], + [ "", "build-all", 0, "", + "Build all packages of the media, even if they are up to date", + sub { $run{build_all} = 1 }, "Setting the full build flag" ], [ "n", "no", 0, "", "Perform all the check but do not compile anything", sub { ($run{no_compile}) = 1 }, "Setting the no compilation flag" ], @@ -840,7 +843,7 @@ do { $status or next; $done{$srpm} and next; $done{$srpm} = 1; - check_version($srpm, \%srpm_version) or next; + check_version(\%run, $srpm, \%srpm_version) or next; if ($run{debug}) { $run{debug}++ == 2 and exit() } $done++; plog('NOTIFY', "Build package $srpm [$done/$to_compile]"); @@ -1222,8 +1225,9 @@ sub process_queue { } sub check_version { - my ($srpm, $srpm_version) = @_; + my ($run, $srpm, $srpm_version) = @_; my ($srpm_name) = $srpm =~ /(.*)-[^-]+-[^-]+\.src\.rpm/; + $run->{build_all} and return 1; if (URPM::ranges_overlap("= $srpm", ">= $srpm_version->{$srpm_name}")) { $srpm_version->{$srpm_name} = $srpm; return 1; @@ -1332,7 +1336,7 @@ sub check_media { $rarch or next; $cache->{queue}{$srpm} = 1; $run{status}{$srpm} = 'ok'; - check_version($srpm, $srpm_version); + check_version($run, $srpm, $srpm_version); } closedir $rpmdir; } @@ -1398,7 +1402,7 @@ sub search_packages { $run->{status}{$srpm} ||= 0; if ($config->{unwanted_packages} && $srpm =~ /$config->{unwanted_packages}/) { next } my $ok = 1; - if (check_version($srpm, $srpm_version)) { + if (check_version($run, $srpm, $srpm_version)) { if (!$run->{ignore_failure} && defined $cache->{failure}{$srpm}) { $run->{status}{$srpm} = 'build_failure'; next; |