Re: When is a file dependency appropriate?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Dne 06. 10. 22 v 10:55 Vít Ondruch napsal(a):

Dne 06. 10. 22 v 9:18 Otto Liljalaakso napsal(a):
Miro Hrončok kirjoitti 6.10.2022 klo 2.33:
On 06. 10. 22 1:21, Otto Liljalaakso wrote:
Recently, I have run into some cases where file dependencies like Requires: /usr/bin/foo are used.

In a recent thread on this mailing list [1],
it is mentioned that such Requires should be avoided,
because resolving file dependencies requires a large amount of memory.

I don't believe that resolving file-Requires from directories listed at [2] from your email is more memory hungry. Where exactly was that said?
[1]: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx/message/CRREDQUPPJYWVRMA4DOKYU2KZZLKC4D5/ [2]: https://docs.fedoraproject.org/en-US/packaging-guidelines/#_file_and_directory_dependencies



Maybe I should have re-read the thread closely before posting,
because the most relevant message is this [3]:

"
The discussion in the bug indicates that this memory growth is related to
loading of the full filepath dataset. We have been discussing splitting
out the non-primary-filepath-data (i.e. paths that are not /etc, /usr/bin,
/usr/sbin), out into a separate lazilly-loaded file. If we manage to do
that, we'll kill two birds with one stone:

- initial download of repo metadata on every freakin' dnf operation can
  go down from 80 to 20 MB
- the peak memory use will go down
"

Which exactly confirms what you say.

I am still wondering a bit if there is something else bad about file dependencies?


If I am not mistaken, in the YUM days, the file list was split into two parts. One list contained several high profile directories such as /usr/bin [1] while the other contained everything. By default YUM have not loaded the full file list by default, just the short one. The data were not loaded by default. But AFAIK, DNF always loads everything and it does not look that this would change. This is one BZ which comes to my mind for a reference: https://bugzilla.redhat.com/show_bug.cgi?id=968006


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.


Vít




IOW for your example, the file dependency was always supported (and IMO preferable). It probably does not matter these days, unless you really consider memory consumption (and I don't think we should generally avoid the file dependencies just on the base of memory consumption).


Vít


[1] https://docs.fedoraproject.org/en-US/packaging-guidelines/#_file_and_directory_dependencies


I was asked not to use those in a recent package review [4].
Maybe that was just a reviewer preference then,
and not based on any benefit for the distribution?

[3]: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx/message/QOQQNVN4JPJOAVUBJJM4XLSINPTOG3VE/
[4]: https://bugzilla.redhat.com/show_bug.cgi?id=2115066
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux