Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Spack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
eic_tools
Spack
Commits
c1580126
Commit
c1580126
authored
10 years ago
by
Gregory L. Lee
Browse files
Options
Downloads
Plain Diff
Merge branch 'develop' of
ssh://cz-stash.llnl.gov:7999/scale/spack
into develop
parents
c4f5a881
be3e8170
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/spack/spack/cmd/location.py
+5
-0
5 additions, 0 deletions
lib/spack/spack/cmd/location.py
lib/spack/spack/fetch_strategy.py
+14
-5
14 additions, 5 deletions
lib/spack/spack/fetch_strategy.py
with
19 additions
and
5 deletions
lib/spack/spack/cmd/location.py
+
5
−
0
View file @
c1580126
...
@@ -54,6 +54,8 @@ def setup_parser(subparser):
...
@@ -54,6 +54,8 @@ def setup_parser(subparser):
help
=
"
Top-level packages directory for Spack.
"
)
help
=
"
Top-level packages directory for Spack.
"
)
directories
.
add_argument
(
directories
.
add_argument
(
'
-s
'
,
'
--stage-dir
'
,
action
=
'
store_true
'
,
help
=
"
Stage directory for a spec.
"
)
'
-s
'
,
'
--stage-dir
'
,
action
=
'
store_true
'
,
help
=
"
Stage directory for a spec.
"
)
directories
.
add_argument
(
'
-S
'
,
'
--stages
'
,
action
=
'
store_true
'
,
help
=
"
Top level Stage directory.
"
)
directories
.
add_argument
(
directories
.
add_argument
(
'
-b
'
,
'
--build-dir
'
,
action
=
'
store_true
'
,
'
-b
'
,
'
--build-dir
'
,
action
=
'
store_true
'
,
help
=
"
Checked out or expanded source directory for a spec (requires it to be staged first).
"
)
help
=
"
Checked out or expanded source directory for a spec (requires it to be staged first).
"
)
...
@@ -72,6 +74,9 @@ def location(parser, args):
...
@@ -72,6 +74,9 @@ def location(parser, args):
elif
args
.
packages
:
elif
args
.
packages
:
print
spack
.
db
.
root
print
spack
.
db
.
root
elif
args
.
stages
:
print
spack
.
stage_path
else
:
else
:
specs
=
spack
.
cmd
.
parse_specs
(
args
.
spec
)
specs
=
spack
.
cmd
.
parse_specs
(
args
.
spec
)
if
not
specs
:
if
not
specs
:
...
...
This diff is collapsed.
Click to expand it.
lib/spack/spack/fetch_strategy.py
+
14
−
5
View file @
c1580126
...
@@ -220,13 +220,22 @@ def expand(self):
...
@@ -220,13 +220,22 @@ def expand(self):
os
.
chdir
(
tarball_container
)
os
.
chdir
(
tarball_container
)
decompress
(
self
.
archive_file
)
decompress
(
self
.
archive_file
)
# If the tarball *didn't* explode, move
# Check for an exploding tarball, i.e. one that doesn't expand
# the expanded directory up & remove the protector directory.
# to a single directory. If the tarball *didn't* explode,
# move contents up & remove the container directory.
#
# NOTE: The tar program on Mac OS X will encode HFS metadata
# in hidden files, which can end up *alongside* a single
# top-level directory. We ignore hidden files to accomodate
# these "semi-exploding" tarballs.
files
=
os
.
listdir
(
tarball_container
)
files
=
os
.
listdir
(
tarball_container
)
if
len
(
files
)
==
1
:
non_hidden
=
filter
(
lambda
f
:
not
f
.
startswith
(
'
.
'
),
files
)
expanded_dir
=
os
.
path
.
join
(
tarball_container
,
files
[
0
])
if
len
(
non_hidden
)
==
1
:
expanded_dir
=
os
.
path
.
join
(
tarball_container
,
non_hidden
[
0
])
if
os
.
path
.
isdir
(
expanded_dir
):
if
os
.
path
.
isdir
(
expanded_dir
):
shutil
.
move
(
expanded_dir
,
self
.
stage
.
path
)
for
f
in
files
:
shutil
.
move
(
os
.
path
.
join
(
tarball_container
,
f
),
os
.
path
.
join
(
self
.
stage
.
path
,
f
))
os
.
rmdir
(
tarball_container
)
os
.
rmdir
(
tarball_container
)
# Set the wd back to the stage when done.
# Set the wd back to the stage when done.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment