Open nim-nim opened 6 years ago
This is a valid use case. But I dislike the idea of adding a new tag for this. I'd rather like to see something that is closer to the hack without its drawbacks
Source1: https://foo.bar/baz -> ba-1.2.tgz
or
Source1: https://foo.bar/baz : ba-1.2.tgz
While anything would be better than the current situation, from a rpm user POW, I'd like less magic and special things in rpm, and more generic operators and constructs.
IE, everything is a variable, except for things that need multiple declarations, and use tags.
SourceX as a tag is IMHO a mistake, for example. You'll never need to declare it multiple time, since you need a unique name to attach special setup actions to. So special tag + special operator does not improve things a lot.
Generic constructs help automating a lot, special constructs need special handling, that always neem to hit corner cases.
So as a long term direction, I'd like unique name tags to be slowly deprecated and replaced by unique name variables with generic variable set/unset behaviour.
And, for Tags that can not be converted to variables right now, because they need the multiple declaration property, I’d like rpm to grow generic multi-declaration primitives.
for Tags that are multi-declared as a poor man way to create arrays: add real rpm variable arrays (%set array [a,b,c]
, %append array [d,e]
, %array %= [a,b,c]
, %array %+= [d,e]
)
for Tags that multi-declared as part of a subpackage scope: create a real %{scope(subpackage): }
primitive (that’s just a generalisation of the -n
used by %package
, %description
, %files
, etc, except without needing a separate flag per line, and without all the bugs when you cut and paste and forget to change the -n
value on one of the lines)
This is a valid use case. But I dislike the idea of adding a new tag for this. I'd rather like to see something that is closer to the hack without its drawbacks
Source1: https://foo.bar/baz -> ba-1.2.tgz
orSource1: https://foo.bar/baz : ba-1.2.tgz
I definitely like this better than having a separate "ArchiveX" tag to correlate things.
Right now rpm assumes it can scrap the archivex filename from SourceX, but nowadays many upstreams publish source archives on URLs that do not contain the actual archive name*
The common workaround is to change SourceX to url#/archivex filename, but that is quite confusing to new packagers and creates artificial urls which are very hard to parse and maintain, are error-prone, have the risk that the website will interpret them differently from rpm
rpm should bite the bullet and allow for each SourceX an optional corresponding ArchiveX, with the following semantics: