diff options
author | Pascal Terjan <pterjan@mageia.org> | 2020-12-19 17:24:04 +0000 |
---|---|---|
committer | Pascal Terjan <pterjan@mageia.org> | 2020-12-19 17:28:16 +0000 |
commit | 2dd2e2c578c528e6ba1b36de8afb560145708f10 (patch) | |
tree | 5f1019a87dff301312e222995d96336cf0226a7e | |
parent | ab4ad3363efedf629f47100634a5b8d0a66b7fbf (diff) | |
download | iurt-2dd2e2c578c528e6ba1b36de8afb560145708f10.tar iurt-2dd2e2c578c528e6ba1b36de8afb560145708f10.tar.gz iurt-2dd2e2c578c528e6ba1b36de8afb560145708f10.tar.bz2 iurt-2dd2e2c578c528e6ba1b36de8afb560145708f10.tar.xz iurt-2dd2e2c578c528e6ba1b36de8afb560145708f10.zip |
iurt: use --target noarch for noarch packages
We were using --target <arch of the chroot used to build>
-rw-r--r-- | NEWS | 3 | ||||
-rwxr-xr-x | iurt | 8 |
2 files changed, 9 insertions, 2 deletions
@@ -1,3 +1,6 @@ +- iurt: use --target noarch for noarch packages rather than the arch used to + built them. + 0.7.15 - iurt: always use urpmi --urpmi-root - iurt: add arch to all log files @@ -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); |