If a package that is going to be installed or updated contains invalid
dependencies return ENXIO and XBPS_STATE_INVALID_DEP xbps state to clients.
This improves the error messages returned to the clients when such
condition happens.
If dependency is installed but does not satisfy the requirements, mark it
as an update and not install. The commit 869466278b changed the logic
for virtual and non virtual packages.
Before that change the code would do the following:
1- if dependency is installed, continue
2- if dependency is queued, continue
3- get dependency from repos
After that change the code does this:
1- if dependency is queued, continue
2- if dependency is installed, continue
3- get dependency from repos
So the dependency is checked if it has been queued as the first phase, which
seems to be the most common path in most cases.
The issue was that xbps_pkgdb_get_pkg() did not find any package,
and the code was free(3)ing heap allocated memory before checking for
errno. I suspect that free(3) has touched errno and this errno value
has been propagated to the next code.
Found after a bit of testing on repo.voidlinux.eu.
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_.