Handle the situation where there are broken dependencies on the client

Bug #921664 reported by Andreas Hasenack
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Landscape Client
Fix Released
High
Björn Tillenius

Bug Description

We need to somehow handle the situation where there are broken dependencies on the client.

For example, I broke landscape-common by removing python-smartpm with --force-depends. I then added USE_APT_FACADE=1 to the landscape-client initscript and restarted it, so it would use apt.

apt is currently complaining that there are problems:

root@ls1-lucid:~# apt-get install libxml2
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run `apt-get -f install' to correct these:
The following packages have unmet dependencies:
  landscape-common: Depends: python-smartpm (>= 1.2-4) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

The -f option suggests the right thing which is to install python-smartpm:

root@ls1-lucid:~# apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  python-crypto clouddeck python-pyasn1 python-chameleon python-openid python-zope.component libarchive1 python-transaction python-encutils erlang-inets erlang-snmp
  rrdtool bind9utils python-twisted-runner erlang-mnesia librrd4 python-txstatsd python-zope.event python-txaws python-lxml erlang-os-mon postgresql-client-8.4
  apache2-mpm-prefork rabbitmq-server libcap2-bin python-z3c.pt procmail python-genshi python-zope.datetime python-z3c python-psutil python-tz python-convoy libhal1
  hal python-commandant python-psycopg2 libsmi2ldbl python-twisted-lore python-twisted-conch python-twisted-news libhal-storage1 python-twisted python-nevow
  squid-common python-dateutil python-txamqp python-cssutils python-zope3 python-epsilon python-ordereddict postgresql-client erlang-crypto python-egenix-mxdatetime
  postgresql-client-common reprepro libc-ares2 liblua5.1-0 python-egenix-mxtools libpq5 erlang-ssl hal-info erlang-runtime-tools postgresql-plpython-8.4
  ttf-ubuntu-font-family python-storm postgresql-common squid-langpack postgresql-8.4 erlang-base erlang-public-key
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  python-smartpm
The following NEW packages will be installed:
  python-smartpm
0 upgraded, 1 newly installed, 0 to remove and 3 not upgraded.
Need to get 210kB of archives.
After this operation, 1,438kB of additional disk space will be used.
Do you want to continue [Y/n]?

Landscape, however, when trying to upgrade libxml2, will actually remove landscape-common and landscape-client (see screenshot).

I'm not sure what the proper action should be here. Some thoughts, in no particular order:
a) Ignore the error, since it doesn't affect libxml2 and its dependencies. It's what smart does.
b) Detect the broken situation, run the equivalent of apt-get -f install and present that to the user, including the original request. So, this activity would become install libxml2 and python-smartpm (and whatever other dependencies arise from that)
c) Cumbersome, but have some sort of special package activity that would just run the equivalent of apt-get -f install in these situations, and perhaps an alert about it (computer foo has dependency problems).

Related branches

Revision history for this message
Andreas Hasenack (ahasenack) wrote :
tags: added: points-2
Changed in landscape-client:
importance: Undecided → High
milestone: none → 12.01.2
Changed in landscape-client:
status: New → In Progress
assignee: nobody → Björn Tillenius (bjornt)
Changed in landscape-client:
status: In Progress → Fix Committed
Changed in landscape-client:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.