From 72d6945e459fc45db2eb2b834d43ac1b81f7a1d3 Mon Sep 17 00:00:00 2001 From: Nicolas Vigier Date: Fri, 7 Dec 2012 13:26:31 +0000 Subject: ulri: allow setting per distro arch ulri currently takes the list of bots defined in $config->{bot} to find the list of architecture for which it should build packages. With this change, it is now possible to define in $config->{$arch} the list of architectures for each distro. If it is not defined for a distro, $config->{$arch}->{default} is used. --- NEWS | 1 + ulri | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 3dfc2dd..a54f4f5 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,7 @@ setting PERL_EXTUTILS_AUTOINSTALL and PERL_AUTOINSTALL to --skipdeps - emi: allow setting per distro mandatory_arch +- ulri: allow setting per distro arch 0.6.13 - use rpmbuild/ rather than rpm/ diff --git a/ulri b/ulri index ec51ea7..9cc6d9e 100755 --- a/ulri +++ b/ulri @@ -152,6 +152,13 @@ my %config_usage = ( desc => 'Default packager tag user by bot', default => 'Mageia Team ' }, + arch => { + desc => 'Architectures list for each target', + default => { + cauldron => [ 'i586', 'x86_64' ], + default => [ 'i586', 'x86_64' ], + }, + }, ); config_usage(\%config_usage, $config) if $run{config_usage}; config_init(\%config_usage, $config, \%run); @@ -535,8 +542,16 @@ foreach my $prefix (sort keys %pkg_tree) { # count noarch todos only once even if searching multiple bots my $noarch_countflag = 0; + my @arch_list = keys %{$config->{bot}}; + if (ref $config->{arch} eq 'ARRAY') { + @arch_list = @{$config->{arch}}; + } elsif (ref $config->{arch}->{$target} eq 'ARRAY') { + @arch_list = @{$config->{arch}->{$target}}; + } elsif (ref $config->{arch}->{default} eq 'ARRAY') { + @arch_list = @{$config->{arch}->{default}}; + } # need to find a bot for each arch - foreach my $arch (keys %{$config->{bot}}) { + foreach my $arch (@arch_list) { # Skip this arch if package is building as noarch # -- cgit v1.2.1