Re: [Rpm-maint] [rpm-software-management/rpm] Cannot leave comments after %endif (#829)

2019-09-04 Thread Ernestas Kulik
Okay, my bad here. I was getting build errors, but seems that it’s because a test was failing prior. The output confused me. -- 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/issu

Re: [Rpm-maint] [rpm-software-management/rpm] Cannot leave comments after %endif (#829)

2019-09-04 Thread Ernestas Kulik
But that’s just Fedora documentation, not RPM documentation, so it’s really you who sets the restrictions, because you own the parser. And notice how I mentioned not disconnecting the comment, because, if you do that, you introduce additional overhead when moving/removing. One has to be more ca

Re: [Rpm-maint] [rpm-software-management/rpm] Cannot leave comments after %endif (#829)

2019-09-04 Thread pavlinamv
>From Fedora documentation [1]: "_To include comments in the spec file, use a # >character at the start of the line._" So the text "# with foo" in line ```%else # with foo``` is not a valid comment. If you need to use a comment near %else, you can write e.g.: ``` %if %{with foo} ... %else # wi

[Rpm-maint] [rpm-software-management/rpm] Cannot leave comments after %endif (#829)

2019-09-04 Thread Ernestas Kulik
https://github.com/rpm-software-management/rpm/pull/625 broke a rather reasonable use case, i.e. ``` %if %{with foo} ... %else # with foo ``` Not even our friendly neighborhood https://github.com/rpm-software-management/rpm/commit/44180fc7400ea8e67a13c5581459ad13f1d14103 can be used. What wou

Re: [Rpm-maint] [rpm-software-management/rpm] Warn if a text is after %else or %endif (#625)

2019-09-04 Thread Ernestas Kulik
Indeed, this has come to bite us in the ass with endless streams of `extra tokens at the end of %endif directive in line 1068: %endif # with python3`. -- 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-s

Re: [Rpm-maint] [rpm-software-management/rpm] Triple operator for conditional shortcut (#115)

2019-09-04 Thread pavlinamv
I do not see any problem in the syntax that @pmatilai proposed in his previous comment: ```%{()?:}``` There are two similar options that are closer to the currently proposed triple condition operator syntax (#746): ```%{{}?:}``` ```%{{}::}``` Using these syntax the example from the previous @mls