Closed (won't fix)
Project:
Drush
Version:
6.x-1.2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
20 Dec 2008 at 04:20 UTC
Updated:
1 Apr 2009 at 04:03 UTC
If there is an old version, i.e. sites/all/modules/devel-6.x-1.x-dev.tar.gz, when I use pm update, drush will use wget to download the new version, but the filename will be devel-6.x-1.x-dev.tar.gz.1
Then, due to filename is different, the MD5 check doesn't pass. Suggest to overwrite the original file or show an error to users.
Comments
Comment #1
kpolymorphic commentedI am trying to replicate this in preparation for exploring a fix
Comment #2
owen barton commentedNoticed this myself - I think overwriting (rather than moving out of the way) is probably fine behavior, since our filenames are pretty unique.
I was actually thinking that for proper behaviour we should download the tar.gz files to /tmp (or an optional user provided temp directory), and then use the -C parameter to tar to extract them to the correct directory base, rather than using the parent directory for the tarball scratch space.
Comment #3
kpolymorphic commentedThe short term fix must be to backup the offending file since it is external to drush and we would have no idea whether it contains valuable data.
This is actually kind of an edge case because only development releases of projects have the same file name across multiple versions. Under production use, this kind of naming collision would not happen during an update; by definition the update version would have a different file name.
For the long term, I was also thinking along the same lines too. We would have to be careful with a shared location due to concurrent users... I would expect that a unique drush session identifier would need to be generated and used as a directory name under the download temporary area to avoid further headaches with respect to naming collisions.
Comment #4
kpolymorphic commentedComment #5
kpolymorphic commentedComment #6
kpolymorphic commentedWell, I replicated this issue in the DRUPAL-6--1-2 release tag and also found that it has already been fixed in the DRUPAL-6--1 branch head. It simply overwrites the offending file at this time.
Comment #7
kpolymorphic commentedComment #8
moshe weitzman commentedwe have unpublished all releases for the moment. use head. for drush_extras, use the tip for the version of drupal you need. drush_extras is soon being folded back into drush, fyi.
Comment #9
moshe weitzman commented