Handle the situation where there are broken dependencies on the client
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-
rrdtool bind9utils python-
apache2-
hal python-commandant python-psycopg2 libsmi2ldbl python-twisted-lore python-
squid-common python-dateutil python-txamqp python-cssutils python-zope3 python-epsilon python-ordereddict postgresql-client erlang-crypto python-
postgresql-
ttf-ubuntu-
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
- Alberto Donato (community): Approve
- Thomas Herve (community): Approve
-
Diff: 160 lines (+109/-3)2 files modifiedlandscape/package/facade.py (+9/-1)
landscape/package/tests/test_facade.py (+100/-2)
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 |