Closed (fixed)
Project:
Drush
Component:
PM (dl, en, up ...)
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
31 Aug 2010 at 19:51 UTC
Updated:
27 Mar 2011 at 15:01 UTC
Jump to comment: Most recent file
When running drush dis [module] on a module that has been enabled by a profile, the profile will be disabled with the module as it formally depends on the module. I understand that this is a conceptual problem with how profiles are handled in Drupal 7 - mixing dependencies and module enabling leads to this behavior. But shouldn't we just leave the profile enabled if we disable a specific module with drush dis?
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | drush-898768.patch | 3.64 KB | jonhattan |
| #3 | drush-898768.patch | 2.08 KB | jonhattan |
Comments
Comment #1
alex_b commentedComment #2
moshe weitzman commentedI've seen the message about 'standard' module being disabled many times but I never thought we actually did that!
I'm OK if we solve with a core patch to module_enable() or a fix in drush.
Assigning to our newest drush maintainer - jonhattan who will look after pm commands.
Comment #3
jonhattanas I've seen, in D7 profiles are hidden modules. We did talk about not showing hidden modules and themes in pm-list command months ago.
drush_pm_list() does:
I don't know how much we should hide hidden modules/themes in drush. We can move the discarding of hidden projects up to drush_get_modules() so there're will be no chance at all to do anything with hidden projects.
---
The other thing I see is that D7 provides two mismatching dependencies list:
dependencies/dependents and requires/required by. Consider this information for color module:
we are using requires/required_by instead of dependencies/dependents in environment_7.inc. I can't remember why we choose that. {snip} well we use it because dependencies is the .info array and requires is that array processed. Example:
dependencies[] = color (1.x)
btw, it seems to me the mismatching is because dependents is never used in D7. If filled an issue for that #908578: dependents array key not used in any place across the code
attached a patch that discard hidden projects. It seems to be enough to fix this issue.
Comment #4
jonhattanComment #5
moshe weitzman commentedWe have to preserve the ability to enable and disable hidden modules and themes. So we can't act like these don't exist.
Comment #6
jonhattanInstall profile is added to the list of modules in _system_rebuild_module_data() as required and hidden.
Alternate solution and fix for a wider bug in drush: required modules can't be disabled.
btw, I've realized that D6 has also the notion of hidden modules.
Comment #7
moshe weitzman commentedLooks like a terrific solution to me. Feel free to commit this, or I will do it in a couple days.
Comment #8
jonhattanCommited.
Comment #9
jonhattanI think this is to be backported to 3.x
Comment #10
moshe weitzman commented3.x gets security fixes only.