Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unbreak numberless %patch from the autonumering changes
Commit 5303626 incorrectly claims that numberless Patch: and Source: referred to number zero internally, instead they were special cased to INT_MAX which allowed differentiating from zero and the cost of ugly hacks here and there, and making referring to the patch/source by %{PATCH/SOURCE<N>) macro rather impossible. Undo the rest of the INT_MAX magic too and make numberless %patch really equal patch number zero. This makes it work for the common case, for example in Fedora's > 19000 specs there is not a single case where the former special INT_MAX magic would've been necessary. If this change breaks somebody's spec, I'll promise to light a candle for it on a dark and cold winter night, we have plenty of those here in Finland.
- Loading branch information
d4f63df
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohhh, we're going full circle here. In the beginning numberless Source/Patch was the same as number zero.
In 2008 came commit 724b07b that used INT_MAX for Source and Patch. Shortly after that was commit 1a173c4 that made Source equal to Source0 again, but left Patch using INT_MAX. And now we're back at the beginning ;-)
d4f63df
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I know. And in the intervening ten years I haven't seen a single package that actually benefited from the special INT_MAX treatment, everybody treats Patch: as if it was Patch0:, so having rpm doing something else seems dumb. Especially since we can do something more useful with the unnumbered version...