On Thu, Oct 6, 2022 at 11:05 AM Vít Ondruch <vondr...@redhat.com> wrote:
> BTW re-reading the ticket and since there are talks about DNF5, maybe it > would be worth of reopening the discussion. I think we could generally > do better and I see two options: > > 1) There seems to be a way to download additional data if needed > > 2) The metadata we provide in reposotories could be better. I.e. instead > of providing full file list, it could be actually enough to collect just > the files of the interest. E.g. if there is somewhere `BR: > /usr/bin/foo`, then during preparation of repo data, there could be file > list with record for bar package, providing entry such as "/usr/bin/foo: > bar". This would probably not require any big changes in DNF IMHO. > One problem I have with `BuildRequires: /usr/bin/foo` is that it hardcodes the /usr/bin directory, which is the right thing to do when the program that uses foo invokes it with full /usr/bin/foo path, but not at all when foo is searched from PATH. This has been a bit of a pain point for flatpak builds in Fedora where the rpms are rebuilt for /app prefix. If a package that has `BuildRequires: /usr/bin/foo` but the package that provides foo is rebuilt for /app prefix, then we no longer have /usr/bin/foo but instead /app/bin/foo and the BR no longer finds the package providing foo. Using %{_bindir} doesn't help either because not all packages that are used for flatpaks are rebuilt for /app (some are part of the flatpak runtime and stay in /usr). Maybe it would instead make sense to have an abstraction where instead of listing /usr/bin/foo in the repo data, we'd have 'Provides: executable(foo)' and then other packages could do 'BuildRequires: executable(foo)' instead? That would nicely solve the hardcoded path issue. -- Kalev
_______________________________________________ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue