Posted by xjm on August 3, 2010 at 6:26pm
4 followers
| Project: | Drush |
| Version: | All-versions-5.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
A lot of the time I know what the update status of the modules on my site is, and would prefer drush just use the last known status information. Additionally, a lot of the time I keep update.module disabled, and only enable it on testbeds or when I want to check module versions (because it's such a performance hit on admin pages).
- Would it be possible/feasible/reasonable to have an option for pm-updatecode to skip the step where it uses update.module refreshes the status information, something like --skip-refresh?
- If such an option existed, would it then be possible to manually ask drush to use the last known status information and run pm-updatecode with update.module disabled? (This is just a side question, I'm mostly interested in merely skipping the check when I want to.)
Comments
#1
Also, this would be a little more convenient with the current patch in #446736: Have drush update be told to ignore a module/theme -- simple solution.
#2
By design, we re-use functions that are in update module. There are no plans to make our updater fully independant of the one in core drupal. If that one is slow, please help fix it in core. I think that core has its own logic for refreshing update_status info. Not sure how easy it is for us to work around it.
Folks are very welcome to work on this, but its not one of my personal priorities.
#3
I see. I think it's probably inevitable that checking for version status information for every project on a site is going to take time; it's just that typically I actually know whether the info is fresh or not and so I don't need update.module/drush to check for me. I'll look into a patch that would at least allow manually using the last known status information rather than checking every time.
#4
I realized that drush is ALLWAYS /refreshing/ the update status information and is /not using the cache/d information which causes quiet a bit of a lag, because it contacts drupal.org each time, i guess, instead of using the information cached the database.
I think I found the reason:
check the following drupal core issue comment once: http://drupal.org/node/220592#comment-1534334
Renamed the ambiguous and lame cache id that stores the data we fetch over the network from 'update_info' to 'update_available_releases' for better self-documenting clarity.
this is not yet reflected in drush's 6.x engine.
check commands/pm/update_info/drupal_6.inc
...
if (!cache_get('update_info', 'cache_update')) {
...
-> it still checks the old cid 'update_info' instead of the new 'update_available_releases'.
i changed the code in question on my local installation and it works - i.e. no more "Refreshing update status information ..." message and the "drush upc" command is now much faster.
greetings
patrick
#5
Confirmed that this fixes the issue. Patch attached.
#6
added same change to d7 and committed.
#7
Automatically closed -- issue fixed for 2 weeks with no activity.