New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Indentation support for tags #2927
Comments
Update to the documentation is still needed Resolves: rpm-software-management#2927
Update to the documentation is still needed Resolves: rpm-software-management#2927
I am against this request. The .spec file is not exactly easy to parse and this won't improve the situation. Also, it is kind of relieving that I don't have to bother with "proper" nesting inside conditionals. BTW what would impact on the shorthand such as:
I think the space is currently not allowed in this construct |
Not sure why your personal taste would have any weight in this discussion. Neither does this change require proper nesting from anyone nor is white space disallowed in these macro expressions (as one can easily check with |
It would just be more consistent in my opinion, as everything (?) else works indented in an if block. On the other hand, I'm not a maintainer and have no experience in building RPMs, as this was my first attempt. |
Maybe because you value community feedback?
Actually RPM requires proper nesting now (no nesting) and it is mostly fine. Allowing nesting will open the discussion about proper nesting, if it should be e.g. 2 spaces or single tab etc. It will motivate people to adjust nesting by conditions, making diffs bigger. No choice is sometimes better.
Not everything can be tested by
vs:
and this is the difference:
|
If the nesting for preamble was allowed, would be nestable also other sections, such as BTW this change would break at minimum Vim syntax highlighter. |
The situation wrt other sections is a bit more complicated. RPM itself does not really support indentation in most. Instead for most sections (scripts and scriptlets) it just does macro expansion and And yes, some syntax highlighting plugins would need to be adjusted. |
Yes, section content is section content. But I think that this is not possible:
and I might be wrong, but I don't see this supported by the PR. Or at least I can't see this covered by test case. Also I am not sure how the
|
Just FTR, I keep asking because example like this: What could be nested here if the PR was accepted? |
Added some docs so you can find out things like that. |
Describe the bug
I try to implement a cross distribution spec file and the dependency names differ.
So I added an if and it works fine, until I indent the line in the if.
To Reproduce
/tmp/test.spec
rpm --specfile /tmp/test.spec
Expected behavior
It should be fine and output
demo-1.0.0-0.noarch
.Output
Environment
Additional context
I am a total rpm newbie and this might be the desired behavior.
I know that the spec file "expands" / is evaluated to something with an randomly indented line, but it looks way better in the spec file.
The text was updated successfully, but these errors were encountered: