This patch adds an alias '@none' => array('root' => '', 'uri' => ''). Two uses for this:

1. When cdw is inside a drupal site, drush @none ... will de-select that site.

2. drush_invoke_process('@none', ... ) becomes the non-bootstrapped equivalent to drush_invoke_process('@self', ... ). For example, site-upgrade uses '@none' to insure that pm-releases operates on a non-bootstrapped site rather than the default (the d6 site being upgraded).

Comments

greg.1.anderson’s picture

StatusFileSize
new2.91 KB

Here is the same thing for 4.x, with an additional fix to allow drush_invoke_process('@self', ...); again.

moshe weitzman’s picture

Seems useful to me.

Do you think these embedded calls to pm-download should use --cache by default?
Could we add this to the site alias docs?

greg.1.anderson’s picture

Regarding docs, the alias topic just dumps examples/example.aliases.drushrc.php, which already has new docs in the above patches.

I think that the embedded call to pm-download should pass through the value of --cache. The easiest way to do this would be to add 'context' => 'DRUSH_CACHE' to the cache entry in drush_get_global_options, just like NOCOLOR does. (Of course, we would have to set the context too.)

I also think that cache should default to on always. However, shouldn't I perhaps commit #0 and #1, and handle cache changes as a separate issue? We can continue to discuss cache here if you prefer, though.

greg.1.anderson’s picture

The wget package handler seems to cache invariantly, regardless of the setting of --cache. The git package handler creates a git reference cache if --cache is set. When pm-enable calls pm-download, it sets --cache, but this is the only place, and it seems unnecessary. If any changes are desired to the cache handling (beyond -removing- --cache from pm-enable's call to pm-download), it will take some consideration and discussion.

greg.1.anderson’s picture

Status: Needs review » Fixed

Committed #0 and #1 to master and 4.x, respectively.

Split off a new issue, #1260114: Cache handling.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

greg.1.anderson’s picture

Issue tags: +Needs change record

Add "Needs change notification".

moshe weitzman’s picture

Issue tags: -Needs change record

No need for change record IMO