[Rpm-maint] [rpm-software-management/rpm] Fix 4.16.0 regression causing invalid spec file name on rpmbuild -ts (#1453)

Michal Domonkos notifications at github.com
Fri Dec 4 14:00:37 UTC 2020


@dmnks approved this pull request.



> @@ -383,12 +385,22 @@ static char * getTarSpec(const char *arg)
 
     if (!gotspec) {
     	rpmlog(RPMLOG_ERR, _("Failed to read spec file from %s\n"), arg);
-	specFile = NULL;
+    } else {
+	/* remove trailing \n */
+	tarbuf[strlen(tarbuf)-1] = '\0';
+	specFinal = rpmExpand("%{_specdir}/%{basename:", tarbuf, "}", NULL);

Elegant! :smiley: 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1453#pullrequestreview-544981744
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20201204/e7757882/attachment.html>


More information about the Rpm-maint mailing list