If it's not already, can you support drush pm-update?

7 replies [Last post]
bronius
Offline
Joined: 05/07/2010
Status: 
Answered

I saw that there was a new version out, so I did a "drush up" and came across this error:
File ms_membership-6.x-6.6a.tar.gz is corrupt (wrong md5 checksum). [error]
Updating project ms_membership failed. Attempting to roll back to [error]
previously installed version.
An error occurred at function : drush_pm_updatecode [error]

I'm honestly pretty new to drush, git, and mac/os, so I can't readily determine whether it's me doing something wrong or what. If you know off the top of your head, please educate me! Life is simpler with drush :)

Thanks!
-Bronius

bronius
Offline
Joined: 05/07/2010
site requires authentication, that's all.. and a tip for others

Ok, I get it. via command line, I can't pull the latest tarball, because I am not authenticated to your store. Is there any way around it? Maybe by implementing the registered keys already in code? (ooh that would be so cool)

A tip for anyone else using drush: I manually copied over the files to apply the updates, and while my Modules page reported the correct version, "drush up" always reported the .6.5 previous version! drush cc cleared my cache, and I was on the road to happiness again.

Thanks for the great module. Looking forward to seeing the reported fixes in this version!

Leighton Whiting
Offline
Joined: 06/02/2009
Bronius, I've never used

Bronius,
I've never used Drush, so I'm not really sure what would be needed to support it. Is it just a problem with the md5 checksum? I could probably get this fixed.

Sincerely,
Leighton

bronius
Offline
Joined: 05/07/2010
Get with drush. Check it out,

<evangelize>Get with drush. Check it out, do it, love it, you'll never forgive yourself for having waited this long!</evangelize>
I doubt it's an md5 checksum error, per se. Drush is a command line utility, and as far as auto downloading and installing an update, consider it to be like "wget". You may have an authenticated client browser session, but drush/wget won't know about it. It tries to grab a file, and it doesn't know how to interpret what it gets back. As a result, it thinks it's just a bad stream (which fails the md5).

If there is a way to handle authentication to your website's download links from command line wget's and similar, then I think we'll be on the road to happiness. I suggested the built-in auth keys you provide that your customers type into our websites as a potential method, because it's there, and a drush hook together with your own download hooks might be able to be built to allow that to be used as a bypass to your authentication check.

Dream on, Bronius.. Dream on..

Leighton Whiting
Offline
Joined: 06/02/2009
I know that wget works for

I know that wget works for downloading the tarballs, as long as you include the auth keys in the download link. You can look at your Updates section of your drupal site to see how that looks.

Sincerely,
Leighton Whiting

bronius
Offline
Joined: 05/07/2010
Ok! I'll check it out and

Ok! I'll check it out and post back if I learn something worthwhile.

bronius
Offline
Joined: 05/07/2010
Just documenting to myself

Just documenting to myself here: the reason wget works is MoneyScripts "My Software" links have the key built-in to the link (as mentioned by Leighton). If there is a way to tell Drush to formulate a url in this manner for a dl, then surely this value can be derived from a simple moneyscripts settings query at the installation.

Leighton Whiting
Offline
Joined: 06/02/2009
Bronius, I updated the script

Bronius,

I updated the script to calculate the md5 checksum differently, let me know if that has any effect.

Sincerely,
Leighton Whiting

Twitter Feed