Closed (fixed)
Project:
Registry Rebuild
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
10 Jul 2011 at 11:26 UTC
Updated:
19 Aug 2011 at 00:44 UTC
registry_rebuild() does not delete files from modules which do not exist anymore. This doesn't affect anything when the registry is just used as a lookup but things fall apart for example when trying to use SimpleTest.
To reproduce:
- Install/Enable a module with tests and Simpletest
- Remove the module with the .test files
- Try to acess the List of tests: Fatal error wich can only be resolved by manually messing around in the database.
The attached patch manually deletes all such files which don't exist anymore.
| Comment | File | Size | Author |
|---|---|---|---|
| delete_stale_files.patch | 932 bytes | berdir |
Comments
Comment #1
berdirComment #2
rfayWow, I can recreate that.... But isn't that a catastrophic failure of registry_rebuild()? What am I missing?
Doesn't look like this problem is addressed in #534594: [meta] system info cache writing and registry rebuilding is broken without a full bootstrap either...
Shouldn't registry_rebuild() do "the right thing" here?
Comment #3
rfayShould we just plain truncate the registry table the first time around?
Comment #6
sunThis actually sounds like it could be fixed directly in core. I'd suggest to move this issue to core, before attempting to work around it here. Or alternatively, commit this patch (looks good to me), and afterwards move the issue, and lastly remove this code when core has been fixed.
Comment #7
rfayThanks, @sun.
Comment #8
rfayLooks like @sun would RTBC this; I'll commit it later. Probably we should have a separate issue for core.
Comment #9
rfayCommitted with equivalent changes to the PHP script. 0bb419f
Thanks!