Open pyjarrett opened 3 years ago
Hello @pyjarrett,
That's an interesting issue. Do you think that Alire should do pacman -Sy
before trying to install stuff?
Might it be a matter of adding the y
here?: https://github.com/alire-project/alire/blob/63552b250f08b627b39470fe44141c7375b5d1f2/src/alire/alire-origins-deployers-system-pacman.adb#L115
Might it be a matter of adding the
y
here?:
Indeed.
I'm not super familiar with pacman
which is why I figured I'd post what I saw and not give a specific recommendation. Reading up on it now, it sounds like using -Sy
with a specific package may lead to later breakages and the "right" way to handle this is through a system-wide update with pacman -Syu
.
The failure case should definitely be communicated better. The question is really, "Should Alire be updating all of msys2?" and how that's integrated into Alire and communicated to the user. If it was my system, I'm not sure I would want Alire to be doing automated upgrades without at least some sort of confirmation.
I don't think either that we should be making system-wide upgrades. My comment was under the assumption that -Sy
would be equivalent to apt update && apt install <pkg>
. The latter is understood to be safe in my experience.
I have been a user of Arch only many years ago so I lost my familiarity with it. Indeed I read now that partial upgrades (-Sy
) are unsupported: https://wiki.archlinux.org/title/System_maintenance#Partial_upgrades_are_unsupported . Not very encouraging that this is recommended by the tool itself however, as seen in your log.
I guess we have to better inform the user that he needs to manually run a system upgrade if pacman fails.
@pmderodat maybe you have an opinion on this.
Hello! I’m a very basic user of pacman, so I don’t understand in the first place how it is possible to get the original error (database file for 'X' does not exist
). I knew that partial upgrades were unsafe, and I definitely agree that Alire shouldn’t try to do system upgrades, at least on its own… Maybe worth discussing with pacman developers?
Windows 10 Pro, running as a standard user. Running Stock Alire: 1.0.0
I fixed this directly via mingw but Alire should probably handle this itself: