Summary

chicken-install uninstalls eggs on updating

Metadata

Description

When we install an egg X that depends on a certain version of egg Y, and we have a version of egg Y installed, but not the minimum version required by X, chicken-installs prompts for an update. If we decide to update Y to the version required by X, chicken-install first uninstalls Y.

This is dangerous. If for any reason Y or any egg in the dependencies chain of Y fail (it has to be reinstalled, after all), we end up in a situation worse than we were before installing X, since, besides not installing X, Y was removed.

Here's a practical example:

 checking dependencies for `awful-static-pages' ...
 
 The following installed extensions are outdated, because `awful-static-pages' requires later versions:
   awful (0.39.2 -> 0.40.0)
 
 Do you want to replace the existing extensions? (yes/no/abort) yes
  upgrade: awful
 removing previously installed extension `awful' ...
   rm -fr '/home/mario/local/chicken-4.8.2/lib/chicken/7/awful.so'
   rm -fr '/home/mario/local/chicken-4.8.2/lib/chicken/7/awful.import.so'
   rm -fr '/home/mario/local/chicken-4.8.2/lib/chicken/7/awful.setup-info'
 
 ...

What if the installation of the new awful fails?

This situation can be potentially more dangerous if the CHICKEN installation is old. Testing new egg versions against old CHICKEN versions is not usual, so they are much more prone to breakage.

Changes and comments

[2015-08-27 09:20:04 UTC] sjamaan changed milestone from someday to 5.0

[2015-08-27 09:20:04 UTC] sjamaan wrote:

Seems to me this should be done as part of the overhaul of the installation system, or afterwards.

[2016-08-25 21:27:00 UTC] sjamaan set difficulty to medium

[2016-08-25 21:27:00 UTC] sjamaan wrote:

Would probably be reasonably tricky and lots of work, but not necessarily **hard**

[2017-04-22 15:19:33 UTC] sjamaan changed status from new to closed

[2017-04-22 15:19:33 UTC] sjamaan set resolution to fixed

[2017-04-22 15:19:33 UTC] sjamaan wrote:

The new chicken-install doesn't uninstall when upgrading anymore.