When pm-enable calls pm-download, is passes the --cache option. This is fine, although unnecessary for the wget package handler, which seems to use the cache invariantly, regardless of the setting of the --cache option. The git package handler, on the other hand, creates a git reference cache if --cache is set.

It seems to me that the --cache option should be removed from em-enable's invoke of pm-download, as this could have unintended consequences (e.g. if $options['package-handler'] = 'git_drupalorg' is permanently set in drushrc.php).

Another issue is that drush interprets --cache as a global option for downloading files, and it also interprets --cache as an sql-sync option, containing the number of hours to hold a dump in the cache. These two definitions can be in conflict.

This conflict should be resolved somehow. The other question is, how should the --cache global option affect caching, and should internal this flag be propagated in backend invoke calls in the same way that --include is (i.e., only on the same machine)?

Comments

moshe weitzman’s picture

Category: task » bug

Yes, i agree that we should remove from pm-enable's invoke of pm-download.

I'm actually OK with keeping --cache as always on for wget and optionally on for git_drupalorg

I think we should remove global option --cache and add it to pm-download (and thus it appears on other commands that internally use pm-download).

moshe weitzman’s picture

Assigned: Unassigned » moshe weitzman

I'll take this on. Does #1 sound OK to folks?

jonhattan’s picture

I'm fine with #1

msonnabaum’s picture

Ok with #1 as well.

moshe weitzman’s picture

Status: Active » Patch (to be ported)

Done per #1. See commit a7569fa if backport is needed.

cache option was already on pm-download so no todo there.

msonnabaum’s picture

Status: Patch (to be ported) » Fixed

Since we've had no real world reports of this being an issue, I'm thinking this doesn't need a backport.

Status: Fixed » Closed (fixed)

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