summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/package.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py
index 999b5e125e..118069a0a7 100644
--- a/lib/spack/spack/package.py
+++ b/lib/spack/spack/package.py
@@ -697,7 +697,9 @@ class Package(object):
##########
# Stage resources in appropriate path
resources = self._get_resources()
- for resource in resources:
+ # TODO: this is to allow nested resources, a better solution would be
+ # good
+ for resource in sorted(resources, key=lambda res: len(res.destination)):
stage = resource.fetcher.stage
_expand_archive(stage, resource.name)
# Turn placement into a dict with relative paths