[Rpm-maint] [rpm-software-management/rpm] Dynamic Build Dependencies (#593)

Panu Matilainen notifications at github.com
Mon Apr 8 12:02:54 UTC 2019


pmatilai commented on this pull request.



> @@ -350,6 +350,18 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what)
 	if ((what & RPMBUILD_CHECKBUILDREQUIRES) &&
             (rc = doCheckBuildRequires(spec, test))) {
 	    if (rc == RPMRC_MISSINGBUILDREQUIRES) {
+		/* Create buildreqs package */
+		char *nvr = headerGetAsString(spec->packages->header, RPMTAG_NVR);
+		rasprintf(&spec->sourceRpmName, "%s.buildreqs.rpm", nvr);
+		free(nvr);
+		/* free sources to not include them in the buildreqs package */
+		while (spec->sources) {
+		    struct Source *t = spec->sources;
+		    spec->sources = t->next;
+		    _free(t->fullSource);
+		    free(t);
+		}

There's a freeSources() function in spec.c for this purpose, make that available through rpmbuild_internal.h and use that instead of duplicating.

-- 
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/593#pullrequestreview-223799062
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20190408/2c224e5f/attachment.html>


More information about the Rpm-maint mailing list