From 9834b77b7a810dffd2bc661bb926e8a1d8696878 Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Wed, 24 Nov 2021 14:37:39 +0000 Subject: Have rpmspec drop the newline directly --- lib/Iurt/Urpmi.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/Iurt/Urpmi.pm b/lib/Iurt/Urpmi.pm index c905034..4214893 100644 --- a/lib/Iurt/Urpmi.pm +++ b/lib/Iurt/Urpmi.pm @@ -526,7 +526,7 @@ sub recreate_srpm { # return 0 unless $ret; - if (!perform_command(qq(chroot $chroot_tmp su $luser -c "rpmspec -q --srpm /home/$luser/rpmbuild/SPECS/$spec > /home/$luser/rpmbuild/SPECS/$spec.srpm_name"), + 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")) { @@ -534,7 +534,6 @@ sub recreate_srpm { return; } my $generated_srpm_name = cat_("$chroot_tmp/home/$luser/rpmbuild/SPECS/$spec.srpm_name"); - $generated_srpm_name =~ s/\s+$//; if (!$generated_srpm_name) { plog("ERROR: failed to get the name of the generated src.rpm"); return; -- cgit v1.2.1