debian/tests/unshare: use --bd-uninstallable-explainer=apt because the dose...
debian/tests/unshare: use --bd-uninstallable-explainer=apt because the dose explainer does not respect apt pinning and thus presents useless successes
Merge request reports
Activity
The
/usr/lib/apt/solvers/apt
program can take CLI arguments like-oDebug::pkgProblemResolver=true
. Unfortunately, the--solver=...
option to apt only allows passing the binary itself but not options to the binary. So there needs to be some way to communicate to thesbuild-cross-resolver
that it is to call/usr/lib/apt/solvers/apt
with debugging options. There are multiple ways forward:- set an environment variable
SBUILD_CROSS_RESOLVER_DEBUG=true
when calling apt and add debug options insbuild-cross-resolver
if the variable is set. The problem is, that therun_apt
method inResolverBase.pm
has no way to pass environment variables, so the function would need to be extended. - call apt with
-oAPT::Solver::sbuild-cross-resolver::Preferences=debug
which will add the string "debug" to thePreferences:
field in the header of the EDSP document passed tosbuild-cross-resolver
. The complication is, that thensbuild-cross-resolver
has to both read that part of the EDSP and pass it to/usr/lib/apt/solvers/apt
- create a wrapper script
sbuild-cross-resolver-debug
which callssbuild-cross-resolver
but with the environment variableSBUILD_CROSS_RESOLVER_DEBUG=true
set. The wrapper script could even be generated dynamically because it is so small? - use a flag-file in
/tmp
whichsbuild-cross-resolver
can check and read
Using
-oAPT::Solver::sbuild-cross-resolver::Preferences=debug
might be the best option because we are mangling the EDSP anyways and thesbuild-cross-resolver
utility is written in perl, so doing this processing is relatively easy.Edited by Johannes Schauer Marin Rodrigues- set an environment variable
TODO: in the apt explainer, call apt with
-o APT::Solver::sbuild-cross-resolver::Preferences=debug
and then insbuild-cross-resolver
process the head of the EDSP and us ethe content of thePreferences
field to find out whether or not to call/var/lib/solver/apt
with debug options or not.added 1 commit
- f884b6f2 - lib/Sbuild/ChrootUnshare.pm: Use tar's --anchored option to support tarballs...
added 15 commits
-
a96d7a12...b7dbd7e2 - 13 commits from branch
main
- cda3f839 - debian/tests/unshare: use --bd-uninstallable-explainer=apt because the dose...
- b3387cd8 - wip
-
a96d7a12...b7dbd7e2 - 13 commits from branch
added 15 commits
-
1afc64a6...b7dbd7e2 - 13 commits from branch
main
- e2c582fe - debian/tests/unshare: use --bd-uninstallable-explainer=apt because the dose...
- 87d7a5b0 - bin/sbuild-cross-resolver: support debug output when used by the apt...
-
1afc64a6...b7dbd7e2 - 13 commits from branch