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

Panu Matilainen notifications at github.com
Fri Feb 14 07:50:41 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);

Mm. This is out of line with our -f usage elsewhere: we don't ask questions about the file origin external sources are pulled in, whether that's %include'd or pulled via -f from in scriptlet, files manifest or otherwise. Much less make them our own.

I can see a use-case for at least %patchlist -f (not so sure about %sourcelist -f), but these external entities are problematic in general as they break the standalone expectations that people have on specs. %include is notoriously nasty, so the question is do we really want more of that?

-- 
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#pullrequestreview-358760663
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20200213/60de3f1a/attachment.html>


More information about the Rpm-maint mailing list