When there's a new xbps update, xbps-install(1) will now return
EBUSY (16) and a message (if dry-run disabled) explaining
how to proceed.
If there's an update and transaction does not contain xbps, it will
error out unless the 'xbps' pkg is the only target pkg, i.e:
# xbps-install -Su
# echo $?
16
To update xbps, the only way to proceed is to explicitly declare
it as an update, i.e:
# xbps-install -u xbps
The dry-run mode will still show there's an xbps update.
Modified the existing test cases to satisfy the new behaviour.
Closes#166Closes#142
If all packages in transaction are on hold, there's no
need to check for conflicts, shlibs, etc.
This makes `xbps-install -un` work faster on my system:
~0.450ms -> ~0.250ms
There's still room for more improvements :-)
See the new test case for details, but this simulates
the recent glvnd switch, with mesa, nvidia and libglvnd.
Thanks @st3r4g for the fix! this indeed fixes the new test case.
Close#186
We do not want to continue processing more threads
if pthread_create(3) fails, rather return an error.
This is for #182 but not yet fixed, there might be a
memleak somewhere.
xbps-rindex(1) has a -r option that sets the remove mode,
due to the changes added to sign repodata we need to access
to the correct directory where repository public keys are
stored. This makes the code use `$PWD/keys` before falling
back to `metadir`.
Fixes the test suite to run with unprivileged users (non root).
In the edge case when an updated package has different (or no)
alternatives groups, make sure to prune those that are in pkgdb
but not in the newly installed package.
A potentially common case of this is when a package that formerly
had alternatives gets removed and a transitional metapackage
takes its place (which has no alternatives).
When the new package has no dependencies, oldest next possible
alternatives group will be used. This is because that indicates
a removed package. When there are dependencies, the newest one
will be used; as this indicates a transitional package.
This only changes the debug messages, because modified files and conf
files are handled the same on removal and unless a conf file changes
the file type it is never deleted.