pbuilder-satisfydepends-apt: Provide a fallback dependency resolver
... for cross-builds.
This is an attempt to address two issues specific for cross-builds:
- apt-get treats arch:all build dependencies as arch:native (#666772)
- apt-get treats reverse provides of virtual packages also as arch:native
This commit implements a fallback resolver guarded by cross-compile condition which does the following:
- Obtains the list of direct build dependencies of given package
- Iterates over them, checking if it is arch:all or arch:native and adds proper package:arch pair to the list
- Virtual packages get processed as a final step: if any of packages providing given virtual package is already in the list, skip this virtual package, otherwise select the first provider candidate.
Signed-off-by: Vasyl Gello vasek.gello@gmail.com