[Rpm-maint] [rpm-software-management/rpm] Make "%patchlist -f patches" work. v2 (#1043)

Panu Matilainen notifications at github.com
Mon Feb 17 11:24:08 UTC 2020


pmatilai commented on this pull request.



> +	       spec->lineNum, name, poptStrerror(rc));
+	goto exit;
+    }
+
+    optCon = poptGetContext(NULL, argc, argv, optionsTable, 0);
+    while ((arg = poptGetNextOpt(optCon)) > 0) {
+
+	char * filename = poptGetOptArg(optCon);
+	if (!filename) {
+	    rpmlog(RPMLOG_ERR,
+		   _("line %d: \"%%%s -f\" requires an argument.\n"),
+		   spec->lineNum, name);
+	    goto exit;
+	}
+
+	addSource(spec, 0, filename, RPMTAG_SOURCE);

With all the other -f's it's intentionally left to be somebody elses headache: if you want it to be shipped with your srpm, you manually add a Source: for it, but if not then its assumed to be something from the build environment, one way or the other. Of course most of the time such things should be specified as sources. So adding a source for the file in which your sources are defined ... this gets a bit crazy.

And yeah, unlike %files -f, these cannot really be created by the build itself. Which means this is for most practical purposes just a specialized version of %include, with many/most of the same problems.

So what I'm really saying here is that we need to think this whole thing through properly before digging further into implementation details.

-- 
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/1043#discussion_r380126703
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20200217/ae3c64ea/attachment.html>


More information about the Rpm-maint mailing list