diff options
Diffstat (limited to 'iurt')
-rwxr-xr-x | iurt | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -42,7 +42,7 @@ use Iurt::Urpmi; use Iurt::Chroot qw(add_local_user create_temp_chroot remove_chroot create_build_chroot clean_chroot); use Iurt::Process qw(perform_command kill_for_good sudo); use Iurt::Mail qw(sendmail); -use Iurt::RPM qw(check_arch); +use Iurt::RPM qw(check_arch check_noarch); use Iurt::Util qw(plog_init plog); use File::NCopy qw(copy); use File::Path qw(mkpath); @@ -803,7 +803,11 @@ retry: debug_mail => $run{debug}, log => $log_dir); # or next; As this failed quite often, do not stop plog('NOTIFY', "Building $srpm"); - my $command = "rpmbuild --target $run{my_arch} --rebuild $run{with_flags} /home/$luser/rpmbuild/SRPMS/$srpm"; + my $target_arch = $run{my_arch}; + if (check_noarch("$path_srpm/$srpm")) { + $target_arch = 'noarch'; + } + my $command = "rpmbuild --target $target_arch --rebuild $run{with_flags} /home/$luser/rpmbuild/SRPMS/$srpm"; if ($run{stop}) { $urpmi->install_packages('chroot', $chroot_tmp, $local_spool, 'configure', "[ADMIN] installation of urpmi and sudo failed in the chroot $run{my_arch}", { check => 1, maintainer => $config->{admin} }, 'urpmi', 'sudo'); add_sudoers($chroot_tmp, $luser); |