On 24/07/17 15:49, Michal Kubecek wrote:
On Wednesday, 19 July 2017 13:32 Simon Lees wrote:
On 19/07/17 20:27, Jan Engelhardt wrote:
On Wednesday 2017-07-19 11:24, Tomas Chvatal wrote:
Well we have replacement in spec-cleaner.
That does not make it better - after all, it's a "pick your poison" kind of choice. s-c may not move comments, but in turn it transmogrifies other things.
But at least when it does you can open a bugreport with a description of what has happened why it shouldn't have happened and then in most cases someone will reply to the bug report and get the issue fixed at some point.
That doesn't help with the basic issue of the tool: it (or rather its author) assumes the is One and Only Right Way to write specfiles. Just for fun, I ran it on one of my specfiles (with -m) and diff-ed the original specfile and the result.
1. Sometimes I want to add an empty line between sections to visually separate them. The tool eats them. 2. For specfiles with more patches (say, from ten up), I find it much easier to read and work with if the "Patch*" lines are separated from the rest of the header. The tool moves them right in the middle of it. 3. I don't want to write "Url" because it's completely wrong but the tool will "fix" my correct "URL" each time. 4. I keep (if-ed) BuildRoot in some of my specfiles because I need them to build on SLE11. The tool started to eat it. Actually, it eats the "BuildRoot" line and leaves an empty %if-%endif section in place.
Out of these, only 3 and 4 make sense to report as bugs; in fact, I already tried with "3" earlier but the response was that can't be done with the way spec-cleaner handles tag canonicalization.
But the real problem is that 1 and 2 are typical "matter of taste" cases. And there are more, e.g. someone prefers to always write curly braces around macro and variable names, someone writes them whenever they are not surrounded by spaces and someone only if necessary.
I agree with some of the issues around whitespace etc, at the same time as someone who reads a large number of specfiles I appreciate the uniformity that spec cleaner brings. Almost every project I contribute to has a coding standard and some of them even do crazy things like mandate 3 spaces but you accept it and live with it so i've kinda just treated spec cleaner in the same way. -- Simon Lees (Simotek) http://simotek.net Emergency Update Team keybase.io/simotek SUSE Linux Adelaide Australia, UTC+10:30 GPG Fingerprint: 5B87 DB9D 88DC F606 E489 CEC5 0922 C246 02F0 014B