#991268 aptitude should provide an option to install packages from lower priority repos (backports, experimental) if the runtime dependency specify a version that can be satisfied only with these repos

Package:
aptitude
Source:
aptitude
Description:
terminal-based package manager
Submitter:
Pirate Praveen
Date:
2021-07-19 11:12:03 UTC
Severity:
important
#991268#5
Date:
2021-07-19 10:04:37 UTC
From:
To:
aptitude already provide such an option for choosing build dependencies
when building for backports or experimental, it would be great if there
is an option for runtime dependencies as well.

Currently we have 3 options,

1. aptitude -t buster-backports/experimental install foo - which will
make priority of every package 500 and can create problems if
conflicting newer versions are in buster-backports or experimental.
2. aptitude install foo bar/experimental - this works when we have
small number of dependencies, but for packages with large number of
dependencies this can be very inconvenient and hard.

For example, to install diaspora, I have to use

apt install diaspora ruby-marcel/bullseye-backports-staging
ruby-autoprefixer-rails/bullseye-backports-staging \
ruby-responders/bullseye-backports-staging
unicorn/bullseye-backports-staging \
ruby-unicorn-worker-killer/bullseye-backports-staging \
ruby-devise-two-factor/bullseye-backports-staging
ruby-sidekiq/bullseye-backports-staging \
ruby-configurate/bullseye-backports-staging
ruby-nokogiri/bullseye-backports-staging \
ruby-open-graph-reader/bullseye-backports-staging
ruby-secure-headers/bullseye-backports-staging \
ruby-hamlit/bullseye-backports-staging
ruby-rotp/bullseye-backports-staging \
ruby-zip/bullseye-backports-staging
diaspora-common/bullseye-backports-staging \
ruby-toml-rb/bullseye-backports-staging
ruby-rails/bullseye-backports-staging \
ruby-railties/bullseye-backports-staging
ruby-actioncable/bullseye-backports-staging \
ruby-actioncable/bullseye-backports-staging
ruby-actionmailer/bullseye-backports-staging \
ruby-actionpack/bullseye-backports-staging
ruby-actiontext/bullseye-backports-staging \
ruby-actionview/bullseye-backports-staging
ruby-activejob/bullseye-backports-staging \
ruby-activemodel/bullseye-backports-staging
ruby-activerecord/bullseye-backports-staging \
ruby-activestorage/bullseye-backports-staging
ruby-activesupport/bullseye-backports-staging \
ruby-actionmailbox/bullseye-backports-staging

buster-backports-staging is unofficially suite as bullseye-backports is
not officially opened yet.

3. Use apt pinning, I currently use this for gitlab,
https://salsa.debian.org/fasttrack-team/gitlab-apt-pin-preferences/-/blob/bullseye-fasttrack/99gitlab

but installing pin preferences is considered a lintian error.

So please provide an option that will choose packages with a lower
priority if the runtime dependency has a requirement that can be
satisfied with a lower priority packages.

#991268#10
Date:
2021-07-19 10:14:40 UTC
From:
To:
[...]

I'm a bit confused because this bug is about aptitude, and there, this
should work already. It might take a couple times of rejecting solver
choices, though. Did you want to report the bug against apt? I think
we already have a report for that, though.

#991268#15
Date:
2021-07-19 11:08:15 UTC
From:
To:
On Mon, 19 Jul 2021 12:14:40 +0200 Julian Andres Klode <jak@debian.org>  wrote:
 > I'm a bit confused because this bug is about aptitude, and there,
this
 > should work already. It might take a couple times of rejecting solver
 > choices, though. Did you want to report the bug against apt? I think
 > we already have a report for that, though.

Can we force that by a command line option? Else if I have to add this
in documentation for example for diaspora, I have to say, use aptitude
and choose n two times etc.

But this did not work for diaspora anyway.

The following packages have unmet dependencies:
 libcurl4 : Depends: libnghttp2-14 (>= 1.12.0) but it is not going to
be installed
            Depends: librtmp1 (>= 2.4+20131018.git79459a2-3~) but it is
not going to be installed
            Depends: libssh2-1 (>= 1.7.0) but it is not going to be
installed
 libjs-bootstrap : Depends: fonts-glyphicons-halflings but it is not
going to be installed
 libjs-jsxc : Depends: libjs-jquery-fullscreen but it is not going to
be installed
              Depends: libjs-prettify but it is not going to be
installed
 diaspora : Depends: diaspora-common (>= 0.7.15.0+debian2) but it is
not going to be installed
            Depends: unicorn (>= 6.0~) but it is not going to be
installed
            Depends: ruby-unicorn-worker-killer (>= 0.4.5~) but it is
not going to be installed
            Depends: ruby-devise-two-factor (>= 4.0~) but it is not
going to be installed
            Depends: ruby-sidekiq (>= 6.2.1~) but 6.0.4+dfsg-2 is to be
installed
            Depends: ruby-configurate (>= 0.5~) but it is not going to
be installed
            Depends: ruby-toml-rb (>= 2.0.1~) but it is not going to be
installed
            Depends: ruby-autoprefixer-rails (>= 10.2.4~) but
10.1.0.0+dfsg1+~cs14.1.12-5 is to be installed
            Depends: ruby-nokogiri (>= 1.11.3~) but 1.11.1+dfsg-2 is to
be installed
            Depends: ruby-open-graph-reader (>= 0.7.1~) but it is not
going to be installed
            Depends: ruby-hamlit (>= 2.14.6~) but it is not going to be
installed
 imagemagick : Depends: imagemagick-6.q16 (>= 8:6.9.2.10+dfsg-2~) but
it is not going to be installed
 graphviz : Depends: libann0 but it is not going to be installed
            Depends: libcdt5 but it is not going to be installed
            Depends: libcgraph6 but it is not going to be installed
            Depends: libglib2.0-0 (>= 2.16.0) but it is not going to be
installed
            Depends: libgts-0.7-5 (>= 0.7.6) but it is not going to be
installed
            Depends: libgvc6 (>= 2.42.1) but it is not going to be
installed
            Depends: libgvpr2 but it is not going to be installed
            Depends: liblab-gamut1 but it is not going to be installed
            Depends: libxaw7 but it is not going to be installed
 libsass-dev : Depends: libsass1 (= 3.6.4+20201122-1) but it is not
going to be installed
 fonts-roboto-hinted : Depends: fonts-roboto-unhinted (>= 0~20170802~)
but it is not going to be installed
 nodejs : Depends: libnode72 (= 12.21.0~dfsg-5) but it is not going to
be installed
 libgmp-dev : Depends: libgmpxx4ldbl (= 2:6.2.1+dfsg-1) but it is not
going to be installed
 ruby-test-unit : Depends: ruby-power-assert but it is not going to be
installed
open: 4948; closed: 50871; defer: 12; conflict: 35 oNo solution found
within the allotted time. Try harder? [Y/n]

After adding
https://salsa.debian.org/rojin/diaspora-apt-pin-preferences/-/blob/master/99diaspora
in /etc/apt/preferences.d aptitude and apt can install diaspora.

I started with aptitude because it can already do this for build
dependencies, but having this in apt would be nice as well.

If you'd like to reproduce this issue, you can use my personal repo at
https://wiki.debian.org/Diaspora#Bullseye_Backports.2Fpersonal_repo
which has a package priority of 100 like official backports.