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
b4b8339d
Commit
b4b8339d
authored
10 years ago
by
Todd Gamblin
Browse files
Options
Downloads
Patches
Plain Diff
bugfix for dot graphs of virtual packages.
parent
0a029167
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/spack/spack/cmd/graph.py
+1
-1
1 addition, 1 deletion
lib/spack/spack/cmd/graph.py
lib/spack/spack/graph.py
+16
-10
16 additions, 10 deletions
lib/spack/spack/graph.py
with
17 additions
and
11 deletions
lib/spack/spack/cmd/graph.py
+
1
−
1
View file @
b4b8339d
...
@@ -39,7 +39,7 @@ def setup_parser(subparser):
...
@@ -39,7 +39,7 @@ def setup_parser(subparser):
'
--dot
'
,
action
=
'
store_true
'
,
'
--dot
'
,
action
=
'
store_true
'
,
help
=
"
Generate graph in dot format and print to stdout.
"
)
help
=
"
Generate graph in dot format and print to stdout.
"
)
method
.
add_argument
(
subparser
.
add_argument
(
'
--concretize
'
,
action
=
'
store_true
'
,
help
=
"
Concretize specs before graphing.
"
)
'
--concretize
'
,
action
=
'
store_true
'
,
help
=
"
Concretize specs before graphing.
"
)
subparser
.
add_argument
(
subparser
.
add_argument
(
...
...
This diff is collapsed.
Click to expand it.
lib/spack/spack/graph.py
+
16
−
10
View file @
b4b8339d
...
@@ -46,6 +46,7 @@
...
@@ -46,6 +46,7 @@
from
llnl.util.tty.color
import
*
from
llnl.util.tty.color
import
*
import
spack
import
spack
from
spack.spec
import
Spec
def
topological_sort
(
spec
,
**
kwargs
):
def
topological_sort
(
spec
,
**
kwargs
):
...
@@ -455,23 +456,28 @@ def quote(string):
...
@@ -455,23 +456,28 @@ def quote(string):
return
'"
%s
"'
%
string
return
'"
%s
"'
%
string
if
not
specs
:
if
not
specs
:
packages
=
spack
.
db
.
all_packages
()
specs
=
[
p
.
name
for
p
in
spack
.
db
.
all_packages
()
]
else
:
else
:
packages
=
[]
roots
=
specs
for
spec
in
specs
:
specs
=
set
()
packages
.
extend
(
s
.
package
for
s
in
spec
.
normalized
().
traverse
())
for
spec
in
roots
:
specs
.
update
(
Spec
(
s
.
name
)
for
s
in
spec
.
normalized
().
traverse
())
deps
=
[]
deps
=
[]
for
pkg
in
packages
:
for
spec
in
specs
:
out
.
write
(
'
%-30s [label=
"
%s
"
]
\n
'
%
(
quote
(
pkg
.
name
),
pkg
.
name
))
out
.
write
(
'
%-30s [label=
"
%s
"
]
\n
'
%
(
quote
(
spec
.
name
),
spec
.
name
))
# Skip virtual specs (we'll find out about them from concrete ones.
if
spec
.
virtual
:
continue
# Add edges for each depends_on in the package.
# Add edges for each depends_on in the package.
for
dep_name
,
dep
in
pkg
.
dependencies
.
iteritems
():
for
dep_name
,
dep
in
spec
.
package
.
dependencies
.
iteritems
():
deps
.
append
((
pkg
.
name
,
dep_name
))
deps
.
append
((
spec
.
name
,
dep_name
))
# If the package provides something, add an edge for that.
# If the package provides something, add an edge for that.
for
provider
in
set
(
p
.
name
for
p
in
pkg
.
provided
):
for
provider
in
set
(
s
.
name
for
s
in
spec
.
package
.
provided
):
deps
.
append
((
provider
,
pkg
.
name
))
deps
.
append
((
provider
,
spec
.
name
))
out
.
write
(
'
\n
'
)
out
.
write
(
'
\n
'
)
...
...
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