Closed (fixed)
Project:
Apps
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
21 Nov 2011 at 23:03 UTC
Updated:
4 Jan 2014 at 01:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
randallknutson commentedI added a bunch of stuff to segment each downloadable by type so that this isn't an issue anymore.
Comment #2
e2thex commentedComment #3
e2thex commenteddo you think we could namespace each item with a random string?
Instead of grouping them?
I do not really see an advantage to grouping them.
Comment #4
randallknutson commentedThe advantage to grouping them is that we don't have to keep track of each random string for each dependency/library.
Here is the sequence of events that happens.
The zipped archive is downloaded to /tmp/update-cache-XXXXX
The archive is unzipped to /tmp/update-extracted-XXXX
The folder is moved to it's final location
This problem revolves around the colorbox module for now. There is both a library and a module that when unzipped are contained within the colorbox folder. This is causing the conflict.
So...
Colorbox-7.x-1.x.tar.gz is downloaded to /tmp/update-cache-XXXXX
colorbox.zip is downloaded to /tmp/update-cache-XXXXX as well
In the pre-patched version of apps, there is a bug in that both the library and dependency are placed within the dependency array which caused one of them to disappear since they both had the same key of "colorbox"
Once I straightened that out and kept the colorbox library under the libraries, it would not extract them both since they would both attempt to extract to /tmp/cache-extracted-XXXX/colorbox. After the first one ran it would assume that the second one did not need to run. In my instance it would then copy the library into the sites/all/modules directory which is not at all correct.
To fix this what I did was to namespace them using the type of download they are; library, module or app. This made it easy to group so that on the step when we copy the directory into it's final destination we could find it again because we know what type it is.
The problem with namespacing them with a random string for each one is that we would have to keep track of the random string for each module and pass it along to the install step so that we know where to find the module when it comes time to move it.
While I do see the case where there are going to be modules and libraries that collide in the namespace quite frequently, there really shouldn't be themes, modules or most other things that collide. If they do, it will cause major problems within drupal. Breaking them into libraries and "other" would probably even solve this.
Comment #5
e2thex commentedwhat if we use a hash of the url? that should be unique and then we do not have to change the open app specification.
Comment #6
randallknutson commentedI like that. I'll look into it.
Comment #7
jec006 commentedHow about this instead:
We just add another level of folders to the download - module and libary folders -
modules are extracted to /tmp/whatevercachething/module/
while libraries are extracted to /tmp/whatevercachething/library/
I'm attaching a patch which has been really lightly reviewed and tested by myself to do this
Comment #8
jec006 commentedI also totally failed to read above ... sorry, this is the OPs original Idea - I'm +1ing it I guess
Comment #9
e2thex commentedtag for sprint
Comment #10
e2thex commented#1 is tested and committed in http://drupalcode.org/project/apps.git/commit/0f7218e
thank you much