I run a module and theme layout as follows:

sites/all/modules/
contrib
patched
sandbox
custom

I think it's quite common to have a patched directory as immediate jump-in-your-face documentation as to what's been messed with.

Would it be useful to have drush pm-update exclude any modules in that directory by default? I'd certainly find it nice. Let me know and I'll write a patch

Comments

greg.1.anderson’s picture

Assigned: Unassigned » jhedstrom

A "patched" directory seems a little esoteric to me, if only because of the fact that it is critical to run registry-rebuild if you move modules from one location to another, and I'm not sure how many people are savvy enough to do that. If you do have such a layout, though, it seems like it might be useful to bulk-exclude some directory patterns (also, everything in a distribution, perhaps?), so I'd be inclined to say 'patches welcome'.

Maybe jhedstrom can weigh in.

jonhattan’s picture

A way to acomplish this is to extend --lock option. Perhaps strip it off pm-update and create its own command.

jonhattan’s picture

OTOH it seems feasible to do it in a manner that also facilitates #1305428: Don't check ALL modules for updates in pm-update when specific modules are specified.

* add --exclude-path option
* at the beginning of drush_pm_updatecode(), exclude from $projects in selected paths
* in _pm_get_update_info() don't create a fetch task for projects not in $projects

jonhattan’s picture

OTOH it seems feasible to do it in a manner that also facilitates #1305428: Don't check ALL modules for updates in pm-update when specific modules are specified.

* add --exclude-path option
* at the beginning of drush_pm_updatecode(), exclude from $projects in selected paths
* in _pm_get_update_info() don't create a fetch task for projects not in $projects

greg.1.anderson’s picture

Version: » 8.x-6.x-dev
Status: Active » Closed (won't fix)
Issue tags: +Needs migration

This issue was marked closed (won't fix) because Drush has moved to Github.

If this feature is still desired, you may copy it to our Github project. For best results, create a Pull Request that has been updated for the master branch. Post a link here to the PR, and please also change the status of this issue to closed (duplicate).

Please ask support questions on Drupal Answers.