0

Is it possible to choose default (or per-launch) aptitude "unmet dependencies" resolution strategy?

For example to have aptitude first offer upgrade-to-unstable/install-from-unstable (sid) than removal of packages, that have unmet dependencies?

Example data from moments ago (debian 9 stretch, with sid repository)

Initial situation presented to aptitude

# aptitude dist-upgrade
The following NEW packages will be installed:
  libboost-program-options1.67.0{a} 
The following packages will be upgraded:
  libgnuradio-analog3.7.13{b} libgnuradio-audio3.7.13{b} libgnuradio-blocks3.7.13{b} libgnuradio-digital3.7.13{b} libgnuradio-fcd3.7.13{b} libgnuradio-fft3.7.13{b} 
  libgnuradio-filter3.7.13{b} libgnuradio-pmt3.7.13{b} libgnuradio-runtime3.7.13{b} libgnuradio-uhd3.7.13{b} 
10 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 2,387 kB of archives. After unpacking 2,656 kB will be used.
The following packages have unmet dependencies:
 libgnuradio-analog3.7.13 : Depends: libboost-regex1.67.0 (>= 1.67.0-10) but it is not going to be installed
 libgnuradio-runtime3.7.13 : Depends: libboost-regex1.67.0 (>= 1.67.0-10) but it is not going to be installed
 libgnuradio-blocks3.7.13 : Depends: libboost-regex1.67.0 (>= 1.67.0-10) but it is not going to be installed
 libgnuradio-uhd3.7.13 : Depends: libboost-regex1.67.0 (>= 1.67.0-10) but it is not going to be installed
 libgnuradio-filter3.7.13 : Depends: libboost-regex1.67.0 (>= 1.67.0-10) but it is not going to be installed
 libgnuradio-digital3.7.13 : Depends: libboost-regex1.67.0 (>= 1.67.0-10) but it is not going to be installed
 libgnuradio-fft3.7.13 : Depends: libboost-regex1.67.0 (>= 1.67.0-10) but it is not going to be installed
 libgnuradio-pmt3.7.13 : Depends: libboost-regex1.67.0 (>= 1.67.0-10) but it is not going to be installed
 libgnuradio-audio3.7.13 : Depends: libboost-regex1.67.0 (>= 1.67.0-10) but it is not going to be installed
 libgnuradio-fcd3.7.13 : Depends: libboost-regex1.67.0 (>= 1.67.0-10) but it is not going to be installed

Aptitude offered solutions in order

  1. keep packages at current version
  2. remove some packages, and keep others at current version
  3. remove some packages, keep some at current version, keep some dependencies unresolved
  4. remove all conflicting packages, keep some dependencies unresolved
  5. install missing dependency from non-priority channel (sid, 100) and do the upgrade of all packages as requested

Final solution

The following actions will resolve these dependencies:

     Install the following packages:              
1)     libboost-regex1.67.0 [1.67.0-10 (unstable)]



Accept this solution? [Y/n/q/?] Y
The following NEW packages will be installed:
  libboost-program-options1.67.0{a} libboost-regex1.67.0{a} 
The following packages will be upgraded:
  libgnuradio-analog3.7.13 libgnuradio-audio3.7.13 libgnuradio-blocks3.7.13 libgnuradio-digital3.7.13 libgnuradio-fcd3.7.13 libgnuradio-fft3.7.13 libgnuradio-filter3.7.13 
  libgnuradio-pmt3.7.13 libgnuradio-runtime3.7.13 libgnuradio-uhd3.7.13 
10 packages upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 2,871 kB of archives. After unpacking 5,837 kB will be used.

Valid solution to my problem, probably isn't one of these:

  1. Change sid channel priority (/etc/apt/preferences) to equal weight as stable/backports - this would shift the whole system to unstable
  2. Running aptitude -t sid dist-upgrade as this would upgrade whole system from unstable channel

So questions are:

  • Is it possible to configure aptitude, to use different resolution strategy?
  • Is there a strategy, that offers first to install/upgrade-from-unstable than excessive package removal? (ie. upgrade of unstable packages with unstable dependencies)
  • Is there a strategy, that offers first to downgrade-to-stable than excessive package removal? (ie. for downgrading package and dependencies from unstable to stable)

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.