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
alpm: Eventually it stops refreshing #533
Comments
I am also getting that alpm error, any way to fix it? |
The problem is temporarily solved with What commands should I run to detect the source of the problem when it occurs again? |
Hi, I have been investigating things recently as I both have Pamac and Discover and wanted to figure out why one worked and the other not. I did dig in the code in GitHub interface found a suspicious line, What this does, at least from my understanding (I think myself to be a good developer but I am not proficient in C and know nothing of PackageKit code base), is that unless the refresh is "forced", the database won't see any updates. I have verified locally that calling I would argue the merge request should be reverted, as its idea is incorrect; the argument is that refreshing databases may cause breakages due to partial updates. |
I believe there is a typo in the original command. The default location of the Arch repository database files is As a result the correct command would be That said, I have also faced the infamous persistent lock file error also, so you might also have to try that. (https://wiki.archlinux.org/title/KDE#Discover_stops_showing_updates_from_Arch_repositories) |
@Etaash-mathamsetty This sounds like it is probably ALPM passing on a pacman error related to old repository databases and keys (not PackageKit ALPM related). Basically the mirrorlists and keylists are provided by packages ( |
@ItachiSan Thank you so much for providing this information. I think I'm now one step closer to solving this thing. Here's my current understanding of the situation: Originally PackageKit always refreshed the repositories when getting updates, then somebody either ran into the partial upgrade conundrum or noticed that it could occur and made the merge request you mentioned. As a result, partial upgrades are no longer possible unless the user uses In summary, in patching an edge case, the main functionality was broken. Obviously something wasn't tested along the way, or someone didn't understand what was going on, or something else like that. I don't agree that the MR should simply be reverted as partial upgrades are indeed rare, but they are a bad thing when they occur. (See https://wiki.archlinux.org/title/System_maintenance#Partial_upgrades_are_unsupported and my diagram below.) Here is the solution I would propose:
This would be the ideal option, since that is how pacman is designed to be used in the first place. Additionally it would prevent partial upgrades on other rolling release systems. Another worthwhile thing to confirm is that the package lists are always refreshed before installing new packages. If this is not so it would actually be more egregious than the partial upgrade situation and should be rectified. |
How would PackageKit present a warning? And so specific no less... |
Hi @joshlangley and @aleixpol , any ideas on how to follow up on this? I can provide inputs, but given my non-invovelment in the project I didn't feel entitled to. Personally, the warning popup sounds good and user friendly in general. Additionally, in Arch specifically, if you do pacman -Sy
pacman -S package this won't upgrade the dependencies and create a partial upgrade situation, as you mentioned. My opinion is that refreshing should not require the |
Hi, I would like to know whether there has been some discussion or not. |
It's been a while since I visited this problem, but I do have a future project that will hinge on it, so I suppose I can't avoid it forever... Basically the further I dug in, the more I realized there's multiple errors at play here, but I wasn't able to sort them out. I tried to dig into the code base a bit but didn't have enough time, and that's when I started noticing the error that got me totally stuck. I started noticing a problem where PackageKit would claim the system was fully up to date, even with all the fixes mentioned in this thread, including Either way, this situation is way worse for the update health of an Arch system than a partial upgrade. Moreover, partial upgrades problems are very rare. I can't remember the last time I saw one cause a problem on any of my systems or servers. My conclusion then, is that |
I've also thought about the warning dialog and I do agree PackageKit shouldn't offer it, at least not the way I described. I do think the user should be given the option to update the system while installing new packages, just as you can with pacman. For example Also, a comment on the force argument, pacman itself sort of implements a flag like this, with |
Original report:
https://bugs.kde.org/show_bug.cgi?id=450381
Further investigation shows that
sudo pacman -Sy --dbpath /var/lib/PackageKit/alpm/
also fixes it.PackageKit was getting the following error from alpm:
failed to uptate database: invalid or corrupted database (PGP signature)
The text was updated successfully, but these errors were encountered: