It was the result of the use of module_rebuild_cache() - see http://drupal.org/node/429132 - and a change in the t() parameters for d7. Tested "drush status" on D6 and D7. See patch.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | drush-d7-update.patch | 11.97 KB | babbage |
| #8 | drush-537280-6.patch | 8.88 KB | jasonn1234 |
| #6 | drush-537280-5.patch | 8.84 KB | jasonn1234 |
| #5 | drush-537280-4.patch | 8.14 KB | jasonn1234 |
| #4 | drush-537280-3.patch | 7 KB | jasonn1234 |
Comments
Comment #1
jasonn1234 commentedI replaced all occurrences of module_rebuild_cache() with the a new function - drush_get_modules() - which conditionally breaks out for D5 & 6 and handles things for D7. Tested on D6 and D7.
Here's drush_get_modules() :
Comment #2
jasonn1234 commentedGeneral "housecleaning" of this nature -- accounting for functions missing or renamed in D7.
So far:
(D5 & D6 --> D7)
-------------------
drupal_init_language() --> drupal_language_initialize()
drupal_install_init_database() --> drupal_install_initialize_database()
module_rebuild_cache() --> system_get_files_database()
_system_theme_data() --> _system_get_theme_data()
Comment #3
moshe weitzman commentedThaks for figuring this out. drush_get_modules() seems to go against the separation that we are doing whereby we have a separate include for each drupal major version ... i'd love for owen to see through these issues related to PM in drush.
it is certainly time we properly support d7. thanks for moving on this.
Comment #4
jasonn1234 commentedOkay - I moved made drush_get_modules() and drush_get_themes() into environment.php, and converted them into wrappers which call drush_include_engine() to account for differences between drupal versions.
I added two includes to the /commands/core/drupal directory - environment.inc and environment_7.inc. These two files break out the conditional behavior for drupal5 & 6, and drupal 7, respectively.
Comment #5
jasonn1234 commentedThis patch is better.... a few more details taken care of.
With the attached patch, the following commands work for me in d7:
help | cron | updatedb | status | cache clear | watchdog show | statusmodules | sql *
Comment #6
jasonn1234 commentedOof.. sorry... this is getting to be a pretty long patch...
I found another issue #535788: Check sites/all/themes for *.drush.inc files
...that's easy to fix but would be dependent on the drush_get_theme() function introduced in this issue.
So - another version of this patch, this time to fix the above search path issue.
Comment #7
moshe weitzman commentedlooks great to me. a code review only found nitpicky stuff:
adrian mentioned that the theme searchpath does not inherit at all commands from base themes. we should remove that feature from this issue.
i'll probably commit the next patch here. feedback welcome.
also, feel free to tackle those narly pm commands.
Comment #8
jasonn1234 commentedAwesome. Okay - I removed all the theme searchpath stuff related to #535788: Check sites/all/themes for *.drush.inc files and fixed the whitespace issues and doxygen documentation.
Comment #9
babbage commentedHaving recently discovered drush (why did it take me so long?) can't wait to have a version that works with D7. This patch gets us part of the way there, but when I tested it fairly thoroughly there are still a number of areas that require work.
Firstly, the patch in #8 includes incorrect directory paths due to not being created from CVS and also failed to create the required file: commands/pm/update_info/drupal_7.inc. The attached patch is created against current cvs HEAD and also creates that file, at this stage created to be identical to the D6 one; this file needs to be present for update to work. .
Successfully ran and tested as working:
help
cron (drush reported success; not independently confirmed)
updatedb
status
statusmodules
refresh
update (Does not return errors. Without official D7 releases of modules difficult to demonstrate it fully works?)
dl
test mail
test clean
sql conf
generate taxonomy
Errors found:
watchdog delete all
enable [module]: failed to display the prompt ,"The following modules will be enabled: cck
Do you really want to continue? (y/n):". Instead, displayed a blank line. If enter is pressed, it aborts; if "y" submitted, then reports all of "The following modules will be enabled: cck. Do you really want to continue? (y/n): CCK Field UI was enabled successfully." Clearly drush is waiting for the usual user input but is no displaying the user prompt until after the user submits their response. This error is seen in enable, disable and uninstall. CCK used as example but same problems seen with other modules.
enable:
In some cases (e.g. CCK) the module is still correctly enabled. In other cases (e.g. admin_menu, charts) the module is not successfully enabled. Both of these modules can be enabled through the usual module admin interface suggesting it is not (solely) due to module code that they are failing to be enabled.
uninstall: always fails.
drush info [modulename]:
generate users [#ofusers]: Appears to correctly generate the requested number of users, but outputs pages and pages of rubbish output before reporting success. e.g.
generate content [#_of_nodes] [#_comments_per_node]: Reports Generated 5 nodes, 30 comments per node. However, while the nodes are created, the comments are not.
Not tested:
script (no examples to hand to test)
sync (not set up to test this currently)
eval
updatecode
sql connect
sql dump
sql query
sql load
sql cli
Comment #10
moshe weitzman commentedWould love owen and adrian's review. There is a little architecture changing here (environment include). From my perspective, we should commit this and keep fixing bugs (especially note the pm commands).
Comment #11
moshe weitzman commentedCommitted this fine patch and fixed watchdog delete. Lets focus on updating the pm commands like info, enable, disable, ...
Comment #12
jasonn1234 commentedExcellent! Yes - I'll happily take a look at the pm commands as soon as I get my head above water again...
Comment #14
moshe weitzman commentedOops. I just committed a drupal_7.inc file which was in this patch. It was in my tree but not checked in. Sorry.