Opened 11 years ago
Closed 8 years ago
#1093 closed enhancement (fixed)
chicken-uninstall should not interpret the given egg as a pattern by default
Reported by: | Mario Domenech Goulart | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 5.0 |
Component: | core tools | Version: | 4.8.x |
Keywords: | chicken-uninstall | Cc: | |
Estimated difficulty: | hard |
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.
Change History (6)
comment:1 Changed 11 years ago by
comment:2 Changed 10 years ago by
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.
comment:3 Changed 10 years ago by
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.
comment:4 Changed 9 years ago by
Milestone: | someday → 5.0 |
---|
Should be part of the CHICKEN 5 rewrite of chicken-uninstall.
comment:5 Changed 8 years ago by
Estimated difficulty: | → hard |
---|
comment:6 Changed 8 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
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.
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 bysp
.If I run
chicken-uninstall -exact sp
, chicken-uninstall will remove sp but leavesp-runtime
, which is installed when wechicken-install sp
.