Skip to content
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

Redundant requires from generators are not merged #1476

Closed
Vogtinator opened this issue Jan 5, 2021 · 5 comments
Closed

Redundant requires from generators are not merged #1476

Vogtinator opened this issue Jan 5, 2021 · 5 comments
Assignees

Comments

@Vogtinator
Copy link
Contributor

I wrote a requires generator for .qml files, which converts import statements to RPM capabilities in the format

qt5qmlimport(QtQuick.Controls.2) >= 3
qt5qmlimport(QtQuick.Controls.Layouts.2) >= 3

This works as expected, but the dependency generator is called for each file, so they accumulate. If one file needs version 2.3 and another needs 2.4, the final package has:

qt5qmlimport(QtQuick.Controls.2) >= 3
qt5qmlimport(QtQuick.Controls.2) >= 4
qt5qmlimport(QtQuick.Controls.Layouts.2) >= 3
qt5qmlimport(QtQuick.Controls.Layouts.2) >= 4

The dependency generator is smart enough to only print the highest required version, but that can only work if it's fed with all files inside each package. That doesn't seem to be possible without using the external dep generator...

Would it be possible to merge those in RPM itself? Or even better, introduce a flag so that the generator is called only once for each package? That would also provide a speedup.

@mlschroe
Copy link
Contributor

mlschroe commented Jan 5, 2021

rpm needs to assign dependencies to files so that 'rpm -q --filerequire' works. So it can't simply drop dependencies.

In case you're wondering: rpm does this to ignore dependencies for files that are not installed, e.g. because they have the wrong file color.

@mlschroe
Copy link
Contributor

mlschroe commented Jan 5, 2021

(At least I thought it does that. Maybe that just was wishful thinking...)

@Vogtinator
Copy link
Contributor Author

I see. For this case at least the mapping is not really useful.

How did this work with the old dep generators? Not at all, I assume?

@Conan-Kudo
Copy link
Member

Pretty much not at all, since RPM shelled out to a program which then returned a blob of text it stored as dependency information.

@ffesti ffesti self-assigned this Jan 15, 2021
@ffesti
Copy link
Contributor

ffesti commented Jul 29, 2022

While there is work to do in the dependency generation department I don't see us merging those dependencies as they are per file. Closing.

@ffesti ffesti closed this as completed Jul 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants