xbps icon indicating copy to clipboard operation
xbps copied to clipboard

XBPS self update is too eager

Open ericonr opened this issue 5 years ago • 6 comments

See https://github.com/void-linux/void-packages/issues/28779

When updating itself, XBPS should only pull in its own dependencies:

➜ xbps-query -x xbps --fulldeptree
libxbps-0.59.1_3
libarchive-3.5.1_1
bzip2-1.0.8_1
liblz4-1.9.3_1
libzstd-1.4.8_1
liblzma-5.2.5_1
acl-2.2.53_1
attr-2.4.48_1
zlib-1.2.11_3
xbps-triggers-0.119_1
ca-certificates-20210119_1
run-parts-4.11.2_1
libressl-3.1.5_2
libtls20-3.1.5_2
libssl48-3.1.5_2
libcrypto46-3.1.5_2
musl-1.2.1_2

Instead, it ends up pulling unrelated packages (such as removed-packages - this includes updating, if already installed, or adding as a new package), which create conflicts (due to shlibs or similar) and make it impossible to continue the self-update (without tinkering by either holding the conflicting package or ignorepkg'ing it).

ericonr avatar Feb 17 '21 17:02 ericonr

It's explained in https://github.com/void-linux/void-packages/issues/28779#issuecomment-780368942 , but I don't understand why such a behavior was chosen.

ericonr avatar Feb 17 '21 17:02 ericonr

It is for #77. Should we check if revdep is ok with old version and skip update then?

Chocimier avatar Feb 17 '21 18:02 Chocimier

Maybe it would be best to resolve this in the debug package generation as well? It could not depend on anything...

ericonr avatar Feb 17 '21 18:02 ericonr

You can also xbps-install -Su xbps Signal-Desktop for example, updating both at the same time.

Vaelatern avatar Feb 18 '21 05:02 Vaelatern

It's hard to make that work if you have a bunch of dependencies that conflict. I don't think the complexity here should be pushed on the user...

Also, this seems to work kinda by luck? xbps-install -u xbps package works, xbps-install -u package xbps doesn't.

ericonr avatar Feb 18 '21 05:02 ericonr

Updating revdeps is also necessary if something depends on libxbps and it had an ABI breakage :P

ericonr avatar Feb 19 '21 19:02 ericonr