-
Notifications
You must be signed in to change notification settings - Fork 364
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
RFE: elfdeps: Filter Python subdirectories #1227
Comments
Problem is well known, but adding Python (or Perl, or whatever) specifics to elf.attr is not ok. Maybe some kind of anti-classifier directive or something. Thinking in the lines of, technically an ELF file is an ELF regardless of where it is on the filesystem, but if there was a way express "not elf" in Python/Perl/etc this would allow dealing with it more locally, but then everybody would need to roll their own version of handling the concrete ELF dependencies that are there regardless. There might be multiple cases for the "not foo" pattern, but it might also be too big a hammer for some/many of them. |
anti-classifier directive is totally fine by me. |
? |
However of course, in this particular case, we only want the provides to be filtered, not requires. If |
Yeah negating the entire ELF class would require handling (some of) it in the python generator instead. It's a blunt tool, maybe suitable for something but we do need something more subtle to correctly and sanely handle this. |
I was thinking how to handle this today. I've only figured out wrong solutions:
:/ |
This is a sub-case of the more general issue tracked now in #2922, closing. |
I'd like the elfdeps to filter out certain directories, namely anything in
/usr/lib(64)?/pythonX.Y/
.Context:
%filter_provides_in %{python_sitearch}/.*\.so$
to avoid getting useless provides%global __provides_exclude_from ^(%{python_sitearch}/.*\\.so)$
lib...
are no longer needed to be filtered out, hence this practice slowly diesBut we cannot get rid of this historical cruft totally, because some packages have Python extension modules named "lib...":
An in turn they either need to filter the provides (which most current Python packagers don't know, unless they have some historical background of 7+ years), or they have bogus provides:
I'd like that no such provides are generated. Easiest way forward is to simply ignore the directories. I am fine with working on a pull request for this, but I'd like to discuss first on what level we should have the directories defined. Would it work if the tool had an
--exclude
argument that would take a path regex to exclude and we would define that to^%{_prefix}/lib(64)?/python\d+\.\d+/
inelf.attr
?The text was updated successfully, but these errors were encountered: