-
Notifications
You must be signed in to change notification settings - Fork 16
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
Use system dnf cache? #55
Comments
Are you using Group or all view? first needs more local caching in fedora since groups are not managed as in mageia. |
Group caching apart, "caching time" is required since those data are sent from dnf-daemon as you can see when progress bar (or reading logs) increases |
and that is performed in background... but dnfdragora has nothing to show yet... i wasn't able to speed up that part, ideas or help are welcome :) |
I am using Group view, all packages do have Group tag in ROSA. Yeah, I already understood, some time is required to load information about all packages. Do dnfdaemon+dnfdragora make a separate cache here? Do they use the cache that is updated by dnf-makecache.timer or a separate one? |
I installed a fresh build of dnfdragora by running |
dnfdragora has also a local "cache" with all the package and groups, though group caching should not be a problem for openmandriva if, as i think, has groups like mageia. But as said i tried to split and optimize that code without gain that much... maybe a better software engineer could help here? Blocking query where slow as well but dialgo was ugly, now dnfdragora waits for data, but time is almost the same... |
We're already using the system cache through dnfdaemon, so this is not actually an issue. The daemon does need to load the cache into memory and enumerate everything, which takes some time. |
4 апреля 2021 г. 17:56:06 GMT+03:00, "Neal Gompa (ニール・ゴンパ)" ***@***.***> пишет:
We're already using the system cache through dnfdaemon, so this is not
actually an issue. The daemon does need to load the cache into memory
and enumerate everything, which takes some time.
Then why did it update metadata on the first launch? Metadata was about 10-30 min old
|
Sorry i can't get what you mean. |
I believe that the issue here is as follows: STEPS TO REPRODUCE IN A TERMINAL:
BEHAVIOR: EXPECTED BEHAVIOR: ADDITIONAL INFORMATION:
Please consider reopening, and fixing this issue. |
As far as I can say with commit ce29aca45d14f9f45d512d3fc5eb6b35db1ab19d and 674f768e10d7f5d90a9069d2a9c89da7a8239e09 We improved metadata management, maybe bugs can be present. We need help to understand how to change the behavior if it is wrong. Patches are also welcome |
As far as I understand, the commits that you mention, don't touch the issue explained here. Maybe you could require a password for refreshing metadata similarly to the way you require a password for installing/updating/removing a package. |
Password (or root permissions) is also needed if you want to refresh dnf system cache. You could make a checkbox in the settings of dnfdragora to always do refreshing with root permissions. This way you would make operating of dnfdragora less irritating for some of us. |
No it isn't needed as far as i know. As said password is requested by right escalation in dnfdaemon, so if dnfdaemon API does not require it, dnfdragora does not ask for password too. Above mentioned commits should bypass this by using dnf-makecache.timer that updates metadata and dnfdragora should assume all is always updated. As said a bug could be present but it should work like that |
Ok, so you have a bug with steps to reproduce it, and at least two independent persons who report faulty behavior. You cannot reproduce the faulty behavior yourself and everything works correctly on your end, true? BTW. dnf-makecache.timer is disabled on my system. |
Honestly i can't see that. Or maybe my system is not so slow, and i have dnf-makecache.timer enabled. So i can't reproduce what you say, and i don't have a test case to get the issue. Maybe you can try to comment the line, I'm not sure it is correct, but try it and let me know, i will check if there is a reason to get it there or some where else... |
Ok. No difference after commenting the line you mentioned. What I think helped is setting "Metadata expire time (hours)" to zero. Then after:
Regarding you are not able to reproduce the issue:
BTW. |
hmm maybe the bug is there then. |
Refreshing metadata from dnfdragora causes:
BTW. dnfdragora doesn't redownload metadata at its every launch. Once it refreshed its metadata, it doesn't need to refresh it again if I start it e.g. 5 minutes later. |
Ok it doesn't add any additional information
That is odd here it works. Which dnfdragora version are you using?
Said that, i'd like to know how dnfdragora can know when a refresh has been performed outside by hands, since you don't use dnf-makecache.timer and no one can set the date but dnfdragora itself (need to check if that realy work though). |
I don't know if you know but after first
2.1.0
True, I don't use dnf-makecache.timer but I don't rely on 'sudo dnf makecache' exclusively. My use case is:
|
|
@Conan-Kudo how can be shared metadata update date between dnf and dnfdragora? I think that is not possible, am i wrong? |
@wojnilowicz i can't remember from which version is in, but i added a check time ago that skips meta data expiration evaluation if update_interval: is <= 0, so if you set it as 0 into option dialog or by hands into configuration file should do what you wanted. It isn't documented because it was a check to avoid mistakes in counting but well it seems what you wanted, let us know if it works. |
I added some log information to understand if for dnfdragora point of view metadata should be downloaded or not |
The daemon always runs privileged as root, so it has access to the DNF cache. |
@Conan-Kudo I meant if there APIs already :D But yes we shouid move this discussion there and see how can we get and make available data... |
I don't know. I started dnfdragora today and it seems to work if update_interval: is <= 0 because it doesn't download over 100 MB of the data, but in the status bar it still displays that it tries to download the repo data. Maybe it's just for visual purposes. |
hmm are you sure that what you see is the package caching instead? that is performed to show groups and other things. |
@Conan-Kudo i don't know that much dnfdaemon code, but what a way could be when dnfdaemon starts:
That way should not need to add any new API, how does that sound? |
Seems sensible to me. |
ok reopening this issue, let's hope to find time soon to work on it |
I don't know. It says "Fedora 35 - x86_64 - Updates" above the progress bar, whatever that means. Only around 7 MB has been downloaded. |
that is it, so. Unfortunately dnfdragora does not ask for a refresh, i wonder if it is required by some other API usage or called implicitally for some reason... |
Every launch of dnfdragora takes quite a lot of time to at least make cache and maybe update metadata, why can't it use system dnf cache without updating it, provided that dnf-makecache.timer is enabled by default? Just to speedup things a lot. Or maybe update metadata in the background.
The text was updated successfully, but these errors were encountered: