This error was reported in the app server project at http://drupal.org/node/1551768 but I think it more applies to the app module. The problem has to do with how app.installer.inc handles the download url in github. Basically using a github url as a downloadable in the app manifest. The apps module (update manager) expects that the url contains the last value to be filename.tar.gz instead of /tarball/master.
For instance the full filename.tar.gz works because the following variables are set correctly:
url: "http://ftp.drupal.org/files/projects/views_slideshow-7.x-3.0.tar.gz"
extract_directory: "temporary://update-extraction-3c17bb3b/app"
locale_cache: "temporary://update-cache-3c17bb3b/views_slideshow-7.x-3.0.tar.gz"
type: app
However these are the variables when dealing with github without a full filename instead /tarball/master
url: "https://github.com/projectname/tarball/master"
extract_directory: "temporary://update-extraction-3c17bb3b/app"
locale_cache: "temporary://update-cache-3c17bb3b/master"
type: app
The error itself has been traced to: archiver_get_archiver in update_manager_archive_extract as it expects to have an extension of (zip, tar, tar.gz, etc)
Comment | File | Size | Author |
---|---|---|---|
#11 | apps-extract-dir-rename-1571428-11-D7.patch | 1.68 KB | andyrigby |
#10 | apps-extract-dir-rename-1571428-10-D7.patch | 1.64 KB | andyrigby |
Comments
Comment #0.0
sylus CreditAttribution: sylus commentedMod
Comment #0.1
sylus CreditAttribution: sylus commentedMod
Comment #0.2
sylus CreditAttribution: sylus commentedMod
Comment #1
nedjoThanks for posting this issue. I ran into this problem with several Github hosted libraries.
This is probably a documentation issue: need to document that URLs for archived downloadables must end in a file name including extension.
A hack with github may be to append
/filename.ext
to the download URL.Comment #2
nedjohttp://githubredir.debian.net is another option. It will provide direct download links.
Comment #3
febbraro CreditAttribution: febbraro commentedAdded the docs for this in the README FAQ
http://drupalcode.org/project/apps.git/commit/6140d79
Comment #4
nedjoIIRC I tried both the hacks I suggested in #2 and #3 and couldn't get either of them to work. Apologies for not coming back to update this issue.
One problem, if I'm recalling correctly, is that the library archive must contain a directory named for the library. (This is because, with Drupal core, each archive contains a directory named for the project.) So even if you have an archive with an extension, it won't install if e.g. it contains a single file.
(A probably unrelated but tangentially similar issue I've hit: #1459618: Incorrect permissions for single file download with make.)
The messy workaround I've used is to create a custom archive of the library containing a correctly-named folder and use that in the manifest.
Comment #5
gusaus CreditAttribution: gusaus commentedHas there been any progress or new suggested workarounds for this issue?
Comment #5.0
gusaus CreditAttribution: gusaus commentedMod
Comment #6
B-Prod CreditAttribution: B-Prod commentedIt seems this issue is asleep...
But as Nedjo said, there is another issue with Github (and probably many others).
The library installation fails when the root folder provided in the archive do not have exactly the same name than the library. This is a serious issue which disallows to use any Github library.
Here is a concrete example, with Flexslider.
Extract of the manifest (there is only the library related part):
The updater extracts correctly the archive, since there is the
tar.gz
extension. But the root folder in the archive isFlexSlider-version-2.2.2
, not simplyflexslider
as expected by the updater. So the apps installation fails with the following exception:Comment #7
hefox CreditAttribution: hefox commentedI added some code to semi handle this situation, but would work with flexslider-vdsfsadf but not FlexSlider-adffdsf
Sounds for your case, being able to specificy the directory that the download will appear in would work -- patches welcome.
Comment #8
hefox CreditAttribution: hefox commentedComment #10
andyrigby CreditAttribution: andyrigby commentedHi,
Re: #7, I was having problems with installing apps from tarballs from bitbucket which extract as the form [username]-[project name]-[commit hash] so I added a patch to check the contents of the dir for the project_name.info file. If this exists then in renames the dir for update module to find.
Comment #11
andyrigby CreditAttribution: andyrigby commentedPatch #10 did not consider libraries, this includes that too.