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
breakages of rpm 4.13 boolean dependencies #174
Comments
Code modification to accept boolean expressions is not hard and has not high priority to me. Patches are welcome. dependency parser needs to be extended to:
This should be sufficient. |
I'm wondering why you didn't simply import the library regex instead of re? I believe that re is deprecated as of Python 3.6. Also, if you have an end of macro function why don't you have a beginning of macro function? Is it implicitly defined? Lastly, how are these boolean expressions being read by the parser. I realize that the parser is only reading one dependency at a time but do the two dependencies (foo, bar) look like this: Requires: (foo and bar) OR do they look like Requires: (%{foo} and %{bar)). That changes how the relevant functions work. |
I don't know that. Note that spec-cleaner is project older than Python 3.6. If you think it will improve the function, just make a patch.
What would such function do? Look for
I'm probably a bit lost here. The function is not implemented and my last comment is naive description how it could be implemented. There are two missing things
What do you think about that? |
Your description is not naive and you are absolutely correct in saying that there are two things missing. When you say "symbol" do you mean a macro? |
Wow, I accidentally edited your comment instead of making my own - sorry.
I mean dependency - it can be package name or something package provides. For example
There is function find_end_of_macro which does exactly that, but is not used for boolean expressions. Code needs to be slightly adjusted as it expects
If you are interested in implementing this, just add it as a test in
IMHO choices are:
It's much better after some sleep :) |
Okay. I will actually do a patch for multiple python files for openSUSE repositories. |
I'm not sure what you mean with that but it will be apparent from merge request, right? :) |
So... in the first few lines of dependency parser.py you have a multi-line comment that says this: |
But yeah, I'll get to work on it right away. :) |
Okay, we might have a logic problem (perhaps not though) this is the modification I've made to depedency_parser.py: |
Code fixing this was merged in master. |
rpm 4.13 (which found its way to Tumbleweed recently) has introduced a new feature: boolean dependencies.
But spec-cleaner (and format_spec_file for that matter) messes them up, turning
into
The minimal (non-intrusive) mode does the same thing.
The text was updated successfully, but these errors were encountered: