Summary

chicken-uninstall should not interpret the given egg as a pattern by default

Metadata

Description

Example:

 $ chicken-uninstall sp                                                          
 
 About to delete the following extensions:
 
   spiffy-cookies
   sp-runtime
   spiffy-request-vars
   sp
   spiffy
 
 Do you want to proceed? (yes/no/abort) [no] no

I think this default is rather dangerous and unnecessary. We should probably make chicken-uninstall only uninstall the exact given egg(s) and have a command line like -match which users can use to explicitly state that they want to remove all eggs matching the given pattern.

Changes and comments

[2014-01-19 18:28:33 UTC] mario wrote:

Also, chicken-uninstall should remove whole eggs, not individual modules/command line tools, since chicken-install doesn't track dependencies of modules in the same egg.

I mean, in the ticket description, sp-runtime should not even be displayed on the output, since it's a module installed by sp.

If I run chicken-uninstall -exact sp, chicken-uninstall will remove sp but leave sp-runtime, which is installed when we chicken-install sp.

[2014-07-30 09:15:13 UTC] sjamaan wrote:

This is rather tricky, because several eggs install multiple modules, most of which are prefixed with the egg's name. For example, you have 9p which installs 9p-client, 9p-lolevel and 9p-server. The utf8 egg installs utf8, utf8-lolevel, utf8-srfi-14, utf8-case-map and utf-srfi-13, all of which should be uninstalled when performing "chicken-uninstall utf8". But, the utf8 egg also installs unicode-char-sets, which is not uninstalled along with the egg!

So all in all this probably requires a rewrite anyway: it should match an exact egg name, which then proceeds to uninstall everything the egg installs. One problem is that setup-files can invoke arbitrary commands, so strictly speaking chicken-install *can't* know what files an egg installs. The aforementioned eggs install more than one "extension". Apparently an egg can map to multiple extensions, but this mapping is not recorded anywhere. Perhaps install-extension can record this, if chicken-install parameterises the eggname before LOADing the .setup-file?

Felix mentioned he wanted to rewrite the setup-api to be more declarative, hopefully this will help make these problems go away entirely.

[2014-07-30 13:46:44 UTC] mario wrote:

Actually, there is a way to find what egg a "thing" belongs to. Things installed by install-extension, install-program and install-script write an egg-name form to .setup-info files. The problem is that, given an egg to uninstall, we have to scan all .setup-info files to find out all the egg's components.

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

[2015-08-27 09:25:41 UTC] sjamaan wrote:

Should be part of the CHICKEN 5 rewrite of chicken-uninstall.

[2016-08-25 21:28:54 UTC] sjamaan set difficulty to hard

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

[2017-04-22 15:20:58 UTC] sjamaan set resolution to fixed

[2017-04-22 15:20:58 UTC] sjamaan wrote:

The new chicken-uninstall has an explicit -match option which causes it to treat its arguments as globs, but it won't do this by default anymore.