Posted by 404 on February 21, 2013 at 3:36am
How to mark a module so drush won't upgrade it? In other words, there's a module I want to keep it at a fixed version, I don't want drupal to check updated version for that module. So I can use drush up --no-core without worrying that module would be upgraded.
I tired to change the module.info, change the project name, the timestamp date, didn' t work.
Comments
There are two ways. drush
There are two ways.
drush pm-updatecode --lock=module_to_ignore
Use the update_advanced module (http://drupal.org/project/update_advanced); it will allow you to mark modules that you want to ignore on the module administration page.
Note that this question is also answered in the ever-handy Drush FAQ: http://drupal.org/drush-faq
It works, thank you!
--lock param is a good solution.
Thank you very much! It could be better if I can write the module names in a file and have --lock to load it.
Sorry I didn't read through the faq. Most of the time I just use drush |grep keywords or dush.ws to learn how to use drush.
I see the drush.ws was updated to include this function. I should have read it before posting a question.
It's even better if there's a drush --long-help that lists all the parameters.
Something like this in a
Something like this in a drushrc.php file will probably work:
$command_specific['pm-update']['lock'] = array(
'module1',
'module2',
'module3'
);
This is neat! Than you!
This is neat! Than you!
old cheesy solution
I've been using this since drush ~4.x, somewhat cheesy, but works:
# drush dis -y {base module name(s)}
{copy the list displayed by: "The following extensions will be disabled"}
# drush up
# drush en -y {all modules that were disabled}
With a known set of modules to not upgrade it's easy enough to script it (and dump the output to a log file for ease of viewing).
Of course expect extra QA time verifying the non-upgraded modules work correctly with the new core and other upgraded modules...
Best,
Sam
Note: syntax not verified.
Drupal Managed Hosting includes Quarterly Updates, Data Migration, ...
.drush-lock-update file blocks updating
In modern drush you can put a .drush-lock-update file in the module's top directory. This will prevent "drush up" from updating that file. The contents of the file will be displayed in the "drush up" listing next to the module version.
You can also use "drush up --lock=ModuleName" to create the file for you.
.drush-lock-update
Hello diamondsea!
I have some sites with changed themes and i do not want to update it by drush.
The .drush-lock-update file will block the update of that themes too, or this work only for modules?
Thanks for your answer!
Works for themes too.
Works for themes too.
Thank you Stefan :-)
Thank you Stefan :-)