[Bug 1920804] Re: Apt does not seem to automatically consider non-candidates when resolving deps
Dimitri John Ledkov
1920804 at bugs.launchpad.net
Mon Mar 22 18:33:20 UTC 2021
As per private conversation, it's not a bug but a feature to only
consider candidates by default.
** Changed in: apt (Ubuntu)
Status: New => Won't Fix
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1920804
Title:
Apt does not seem to automatically consider non-candidates when
resolving deps
Status in apt package in Ubuntu:
Won't Fix
Bug description:
# apt show sbuild-build-depends-main-dummy
Package: sbuild-build-depends-main-dummy
Version: 0.invalid.0
Maintainer: Debian buildd-tools Developers <buildd-tools-devel at lists.alioth.debian.org>
Installed-Size: unknown
Depends: debhelper (>= 9), debhelper-compat (= 12), dpkg-dev (>= 1.17.14), python3, cargo (>= 0.40.0), rustc (= 1.49.0+dfsg1+llvm-0ubuntu1), libstd-rust-dev (= 1.49.0+dfsg1+llvm-0ubuntu1), libstd-rust-1.49 (= 1.49.0+dfsg1+llvm-0ubuntu1), cmake (>= 3.0) | cmake3, pkg-config, zlib1g-dev, zlib1g-dev, liblzma-dev, autotools-dev, m4, ninja-build, binutils (>= 2.26) | binutils-2.26, git, procps, gdb (>= 7.12), build-essential, fakeroot, libssl-dev
Conflicts: gdb-minimal (<< 8.1-0ubuntu6), libstd-rust-1.50, libstd-rust-dev (>= 1.50.0), rustc (>= 1.50.0)
Download-Size: 1096 B
APT-Sources: copy:/build/rustc-Csm90L/resolver-AFxnMU/apt_archive ./ Packages
Description: Dummy package to satisfy dependencies with apt - created by sbuild
This package was created automatically by sbuild and should never appear on
a real system. You can safely remove it.
# apt-cache policy libstd-rust-dev rustc
libstd-rust-dev:
Installed: (none)
Candidate: 1.50.0+dfsg1+llvm-0ubuntu1
Version table:
1.50.0+dfsg1+llvm-0ubuntu1 500
500 http://archive.ubuntu.com/ubuntu hirsute/universe amd64 Packages
1.49.0+dfsg1+llvm-0ubuntu1 500
500 http://ppa.launchpad.net/ci-train-ppa-service/4491/ubuntu hirsute/main amd64 Packages
rustc:
Installed: (none)
Candidate: 1.50.0+dfsg1+llvm-0ubuntu1
Version table:
1.50.0+dfsg1+llvm-0ubuntu1 500
500 http://archive.ubuntu.com/ubuntu hirsute/universe amd64 Packages
1.49.0+dfsg1+llvm-0ubuntu1 500
500 http://ppa.launchpad.net/ci-train-ppa-service/4491/ubuntu hirsute/main amd64 Packages
# apt install sbuild-build-depends-main-dummy
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
sbuild-build-depends-main-dummy : Depends: cargo (>= 0.40.0) but it is not going to be installed
Depends: rustc (= 1.49.0+dfsg1+llvm-0ubuntu1) but it is not going to be installed
Depends: libstd-rust-dev (= 1.49.0+dfsg1+llvm-0ubuntu1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
But:
# apt install sbuild-build-depends-main-dummy rustc=1.49.0+dfsg1+llvm-0ubuntu1 libstd-rust-dev=1.49.0+dfsg1+llvm-0ubuntu1
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
autoconf automake autopoint autotools-dev bsdextrautils cargo cmake cmake-data debhelper debugedit dh-autoreconf dh-strip-nondeterminism dwz file gdb gettext gettext-base git git-man
groff-base intltool-debian libarchive-zip-perl libarchive13 libbabeltrace1 libboost-regex1.74.0 libcurl4 libdebhelper-perl libdebuginfod-common libdebuginfod1 liberror-perl
libfile-stripnondeterminism-perl libgit2-1.1 libhttp-parser2.9 libipt2 libjsoncpp24 liblua5.2-0 liblzma-dev libmagic-mgc libmagic1 libmbedcrypto3 libmbedtls12 libmbedx509-0
libpipeline1 libpopt0 libpython3.9 librhash0 librpmio9 libsigsegv2 libsource-highlight-common libsource-highlight4v5 libssh2-1 libssl-dev libstd-rust-1.49 libsub-override-perl libtool
libuchardet0 libuv1 m4 man-db ninja-build pkg-config po-debconf ucf zlib1g-dev
Suggested packages:
autoconf-archive gnu-standards autoconf-doc cargo-doc cmake-doc dh-make rpm-i18n gdb-doc gdbserver gettext-doc libasprintf-dev libgettextpo-dev git-daemon-run | git-daemon-sysvinit
git-doc git-el git-email git-gui gitk gitweb git-cvs git-mediawiki git-svn groff lrzip liblzma-doc libssl-doc libtool-doc gfortran | fortran95-compiler gcj-jdk m4-doc apparmor less
www-browser libmail-box-perl rust-doc rust-src lld-11
Recommended packages:
libc-dbg curl | wget | lynx less ssh-client libarchive-cpio-perl libltdl-dev libmail-sendmail-perl rust-gdb | rust-lldb
The following NEW packages will be installed:
autoconf automake autopoint autotools-dev bsdextrautils cargo cmake cmake-data debhelper debugedit dh-autoreconf dh-strip-nondeterminism dwz file gdb gettext gettext-base git git-man
groff-base intltool-debian libarchive-zip-perl libarchive13 libbabeltrace1 libboost-regex1.74.0 libcurl4 libdebhelper-perl libdebuginfod-common libdebuginfod1 liberror-perl
libfile-stripnondeterminism-perl libgit2-1.1 libhttp-parser2.9 libipt2 libjsoncpp24 liblua5.2-0 liblzma-dev libmagic-mgc libmagic1 libmbedcrypto3 libmbedtls12 libmbedx509-0
libpipeline1 libpopt0 libpython3.9 librhash0 librpmio9 libsigsegv2 libsource-highlight-common libsource-highlight4v5 libssh2-1 libssl-dev libstd-rust-1.49 libstd-rust-dev
libsub-override-perl libtool libuchardet0 libuv1 m4 man-db ninja-build pkg-config po-debconf rustc sbuild-build-depends-main-dummy ucf zlib1g-dev
0 upgraded, 67 newly installed, 0 to remove and 0 not upgraded.
Need to get 103 MB of archives.
After this operation, 472 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Is fine.
It feels that apt should be automatically considering non-candidate
versions, if the version constraints demand that, when installing the
sbuild generated dummy package which converts debian/control build-
depends into depends.
Apt itself seems to do everything right, and I do wonder that maybe we
should stop doing this whole thing with custom archive & a deb to
install build-dep, and instead implement to use `apt build-dep` in
sbuild to install build-deps. But I don't see enough flags in `apt
build-dep` to consider B-D & B-C and then sometimes also choose to
consider -Arch & -Indep variants. Also not sure if build profiles are
considered correctly.
Oh and apt build-dep ./ on the debian/control that generated above
dummy dependency package just worked fine.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1920804/+subscriptions
More information about the foundations-bugs
mailing list