Always check if there's a new xbps package version available
while *installing* or *updating* in any form.
This fixes the following scenario:
- xbps-0.53_10 is currently installed
- xbps-0.54_1 is available in repo
- xbps-install --update netbsd-wtf || xbps-install new-pkg || xbps-install --update
As expected any of the following scenarios in last cmd will use *this*
transaction to autoupdate xbps and its reverse dependencies.
Another transaction will be necessary to install or update the other unrelated
packages.
Added a new test case to verify this case and improve the other test
cases with more extensive checks.
The current code was failing because while checking for updates
on its reverse dependencies, up-to-date versions were treated
as an error.
Added a new test case to verify that it works as expected.
Signed-off-by: Juan RP <xtraeme@gmail.com>
This fixes the cases where a pkg installation or update
could break its revdeps due to not satisfying dependencies.
When performing an install or update, xbps now always checks if
there are updates for its revdeps and get added to the transaction.
See the two new test cases for more information.
At the time we've been searching for the pkg in a repo, no repos
were registered resulting in EINVAL. While here, if there's no
declared repos return ENOENT instead.
Rather than collecting dependencies for a pkg that has been added to the
transaction dictionary, do this for all pkgs in transaction once all
packages are already there.
To put a package on hold mode:
$ xbps-pkgdb -m hold foo
To unhold the package:
$ xbps-pkgdb -m unhold foo
To list packages on hold mode:
$ xbps-query -H
This also close#12 from github.
The list of required external deps is now confuse, libarchive and openssl.
libxbps now includes a wrapper for proplib prefixed with xbps_ rather than prop_.
This fixes the following problem:
- pkg is installed with state "unpacked".
- There's an update of pkg in transaction.
- xbps tries to configure the pkg because its state is "unpacked",
therefore ignoring the update.
These are the core interfaces in the new API:
rpool - Interface to interact with the repository pool.
rindex - Interface to interact with repository indexes.
pkgdb - Interface to interact with local packages.
transaction - Interface to interact with a transaction.
This also brings new repository index format, making the index file
per architecture and being incompatible with previous versions.
The transaction frequency flush option has been removed, and due to
the nature of package states it was causing more harm than good.
More changes coming soon, but the API shall remain stable from now on.