You are not logged in.

#1 2024-10-02 11:57:18

jronald
Member
Registered: 2022-05-09
Posts: 105

[SOLVED] Denpencies's problem when installation fails

e.g. I'm using "yay" install an AUR package called "A", which dependes on lib "B" and tool "C", as below

yay -S A

When installing, it asks me weather to remove intermediate tools after installation, i.e. "C" in this case.
I chooses yes, and the installation proceeds.
As dependencies, "B" and "C" are installed successfully.
But when installing "A", it fails. Will "B" and "C" be removed automatically then?
BTW, in practice the dependencies could be a mass, which can hardly be checked one by one.

Last edited by jronald (2024-10-02 14:01:37)

Offline

#2 2024-10-02 13:02:47

gromit
Package Maintainer (PM)
From: Germany
Registered: 2024-02-10
Posts: 657
Website

Re: [SOLVED] Denpencies's problem when installation fails

I guess they won't neccessarily be removed, but this is not a big issue:

https://wiki.archlinux.org/title/Pacman … _(orphans)

Offline

#3 2024-10-02 13:08:54

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: [SOLVED] Denpencies's problem when installation fails

I also suspect you probably wouldn't want these packages removed by default.  If building "A" fails, what proportion of the time are you really just giving up and forgetting about "A"?  I'd suspect this is rare.  Typically one would fix the problem that caused the failure in "A" to build, then they'd complete the installation - at which point the dependencies would be needed.  So removing them just to reinstall them a moment later would not be a good default behavior.

So if you're going to retry "A", there's no problem at all.  If you decide to give up on "A", you'd just clean up orphans as noted in the previous post.

Last edited by Trilby (2024-10-02 13:09:36)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#4 2024-10-02 14:01:19

jronald
Member
Registered: 2022-05-09
Posts: 105

Re: [SOLVED] Denpencies's problem when installation fails

Trilby wrote:

So if you're going to retry "A", there's no problem at all.  If you decide to give up on "A", you'd just clean up orphans as noted in the previous post.

Yes, I just forgot that orphans could be cleaned.
Thanks

BTW, there might be better alternatives with different dependencies before a succesful installation of the current one, so sometimes it's useful to clean orphans.

Last edited by jronald (2024-10-04 00:02:34)

Offline

Board footer

Powered by FluxBB