Due to this change, `./xbps-src sort-dependencies` will take
checkdepends into account when using -Q or -K.
Before this commit, if `pkgA` checkdepends on `pkgB`, sort-dependencies
could still print `pkgA` before `pkgB`. This causes CI to build `pkgB`
twice: first when building `pkgA`, which forces implicit build of pkgB;
second when building `pkgB` (explicit, so it will ignore the package is
already built).
The implementation uses `skip_check_step()` from previous commit, for
consistency, so checkdepends are only taken into account if the check
step would be enabled.
In particular, nothing is changed unless -Q or -K flag is passed.
EXAMPLE:
Before:
```
$ ./xbps-src -Q sort-dependencies python3-process-tests python3-pytest-cov
python3-pytest-cov
python3-process-tests
```
After:
```
$ ./xbps-src -Q sort-dependencies python3-process-tests python3-pytest-cov
python3-process-tests
python3-pytest-cov
```
This function contains the logic that determines whether the check step
will be skipped for the current pkg, taking into account `make_check`.
Use this new function in `install_pkg_deps()` so that it uses a more
accurate condition to skip installing check dependencies.
For instance, check dependencies for a pkg with `make_check=extended`
will no longer be installed when using `-Q`. Similar for `make_check=ci-skip`.
Replaces: #46207
Add --enable-option-checking to configure flags and remove unused --with-march
flags. Those flags come from gcc and not glibc.
Also, correct rootsbindir in configparams and remove libc_cv_rootsbindir since
it gets overridden by .m4 scripts in configure and rootsbindir in configparams.
only sort shlib-deps, as those are automatically found.
regular dependencies should not be sorted as that can mess with the
order for things like virtual packages or alternatives groups, notably
for gawk (needs to be before anything that depends on the awk virtual
package) and dash (needs to be before bash to select the correct sh
alternatives group).
partial revert of 5ec2556004