diff options
author | Pascal Terjan <pterjan@mageia.org> | 2023-01-19 23:57:33 +0000 |
---|---|---|
committer | Pascal Terjan <pterjan@mageia.org> | 2023-01-19 23:57:33 +0000 |
commit | fff6b7df49063a3f7cbd42c2c2f87a9b6563cab2 (patch) | |
tree | c503592c300472bf18b5d467337bda3cbb899606 | |
parent | cfcd4507544f1c57802925255ecdfb9234f1feee (diff) | |
download | iurt-fff6b7df49063a3f7cbd42c2c2f87a9b6563cab2.tar iurt-fff6b7df49063a3f7cbd42c2c2f87a9b6563cab2.tar.gz iurt-fff6b7df49063a3f7cbd42c2c2f87a9b6563cab2.tar.bz2 iurt-fff6b7df49063a3f7cbd42c2c2f87a9b6563cab2.tar.xz iurt-fff6b7df49063a3f7cbd42c2c2f87a9b6563cab2.zip |
iurt: Fix buildreqs.nosrc.rpm filename on Mageia build system
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | lib/Iurt/Urpmi.pm | 14 |
2 files changed, 15 insertions, 1 deletions
@@ -1,3 +1,5 @@ +- iurt: Fix buildreqs.nosrc.rpm filename on Mageia build system + 0.8.0 - iurt: Add support for DynamicBuildRequires - ulri: Do not remove lock file and mark build as done until we copied the diff --git a/lib/Iurt/Urpmi.pm b/lib/Iurt/Urpmi.pm index 0f084c9..aec4f87 100644 --- a/lib/Iurt/Urpmi.pm +++ b/lib/Iurt/Urpmi.pm @@ -566,7 +566,19 @@ sub install_dynamic_buildrequires { return 1; } - my $nosrc = $srpm =~ s/src.rpm$/buildreqs.nosrc.rpm/r; + if (!perform_command(qq(chroot $chroot_tmp su $luser -c "rpmspec -q --qf %{NVR}.src.rpm --srpm /home/$luser/rpmbuild/SPECS/$spec > /home/$luser/rpmbuild/SPECS/$spec.srpm_name"), + $run, $config, + use_iurt_root_command => 1, + hash => "identify_$srpm")) { + plog("ERROR: failed to get the name of the generated src.rpm"); + return; + } + my $new_srpm = cat_("$chroot_tmp/home/$luser/rpmbuild/SPECS/$spec.srpm_name"); + if (!$new_srpm) { + plog("ERROR: failed to get the name of the generated src.rpm"); + return; + } + my $nosrc = $new_srpm =~ s/src.rpm$/buildreqs.nosrc.rpm/r; while (1) { # There is no way with perform_command to get the actual error code. |