From 650e21e67f99b1a1a779b11aa01a3f658e3a7619 Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Fri, 13 Oct 2017 16:22:47 +0100 Subject: Fix getting package name from src.rpm Name is prefixed by revision on the buuld system. Also, this was already done for build_timeout so share the code. --- iurt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'iurt') diff --git a/iurt b/iurt index b71f9fc..6cf9b3d 100755 --- a/iurt +++ b/iurt @@ -720,8 +720,8 @@ sub rebuild_one { retry: $urpmi->clean_urpmi_process; - $srpm =~ /(.*)-[^-]+-[^-]+\.src\.rpm$/ or return $srpm; - my $srpm_name = $1; + my ($srpm_name) = $srpm =~ /(?:.*:)?(.*)-[^-]+-[^-]+\.src\.rpm$/; + $srpm_name or return $srpm; if (!$run{use_old_chroot}) { plog('DEBUG', 'Not reusing old chroot'); @@ -810,7 +810,6 @@ retry: $command = "rpmbuild -b$run{stop} /home/$luser/rpmbuild/SPECS/$spec"; } - my ($srpm_name) = $srpm =~ /(?:.*:)?(.*)-[^-]+-[^-]+\.src\.rpm$/; my $icecream; if ($run{icecream}) { $icecream = "RPM_BUILD_NCPUS=$run{icecream}"; -- cgit v1.2.1