Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better install output #5714

Merged
merged 3 commits into from Oct 12, 2017
Merged

Better install output #5714

merged 3 commits into from Oct 12, 2017

Conversation

tgamblin
Copy link
Member

@tgamblin tgamblin commented Oct 12, 2017

This is actually 3 fixes. The main fix in this PR beautifies spack install output:

  • do_install() was originally depth-first recursive, and printed <pkg> already installed in ... multiple times for packages as recursive calls encountered them.
  • For much cleaner output, use spec.traverse(order='post') to install dependencies instead.
  • Now info about each install is printed only once.

We can probably make things cleaner still, but this gets rid of the largest current source of noise in install() output.

All tasks:

  • spack install prints out much less output, especially for large DAGs.
  • Get rid of vestigial deptype_query argument to spec.traverse()
  • Fix a bug with --fake installs

The install fix turns 197 lines of spack install xsdk output into 152 lines, by getting rid of stuff like this:

$ spack install --fake xsdk
...

==> Successfully installed trilinos
  Fetch: .  Build: 4.30s.  Total: 4.30s.
[+] /Users/gamblin2/src/spack/db/test-tree/darwin-sierra-x86_64/clang-7.0.2-apple/trilinos-xsdk-0.2.0-d5wjl6o4fceno7w7dlv4cvi7wwmgoozb
==> hypre is already installed in /Users/gamblin2/src/spack/db/test-tree/darwin-sierra-x86_64/clang-7.0.2-apple/hypre-xsdk-0.2.0-nlrcck7w2bckbnfeivvie7ecoheoryed
==> metis is already installed in /Users/gamblin2/src/spack/db/test-tree/darwin-sierra-x86_64/clang-7.0.2-apple/metis-5.1.0-msxayllqzgji6se66iucactn6zd2g3kq
==> superlu-dist is already installed in /Users/gamblin2/src/spack/db/test-tree/darwin-sierra-x86_64/clang-7.0.2-apple/superlu-dist-xsdk-0.2.0-pl63z4w5rlusg36yfptkv6coaz7lhixr
==> bzip2 is already installed in /Users/gamblin2/src/spack/db/test-tree/darwin-sierra-x86_64/clang-7.0.2-apple/bzip2-1.0.6-hp626dwtuiakdmsgazw7xd6ymyijxjyn
==> ncurses is already installed in /Users/gamblin2/src/spack/db/test-tree/darwin-sierra-x86_64/clang-7.0.2-apple/ncurses-6.0-ny2iyrd374kkzwc2bam5xqvbbkxgmxgv
==> zlib is already installed in /Users/gamblin2/src/spack/db/test-tree/darwin-sierra-x86_64/clang-7.0.2-apple/zlib-1.2.11-fn323gjmbkegonjedtppmyua7xfkxy7t
==> openssl is already installed in /Users/gamblin2/src/spack/db/test-tree/darwin-sierra-x86_64/clang-7.0.2-apple/openssl-1.0.2k-nxao5denc343bgfsvio6q22jwmxl62m2
==> ncurses is already installed in /Users/gamblin2/src/spack/db/test-tree/darwin-sierra-x86_64/clang-7.0.2-apple/ncurses-6.0-ny2iyrd374kkzwc2bam5xqvbbkxgmxgv
==> Installing readline

...

The new output is much more organized:

$ spack install --fake xsdk
==> Installing pkg-config
==> Building pkg-config [AutotoolsPackage]
==> Successfully installed pkg-config
  Fetch: .  Build: 0.26s.  Total: 0.26s.
[+] /Users/gamblin2/src/spack/db/test-tree/darwin-sierra-x86_64/clang-7.0.2-apple/pkg-config-0.29.2-x67y3tjvezfvj6odssyblthsbzk7f6ca
==> Installing ncurses
==> Building ncurses [AutotoolsPackage]
==> Successfully installed ncurses
  Fetch: .  Build: 0.26s.  Total: 0.26s.
[+] /Users/gamblin2/src/spack/db/test-tree/darwin-sierra-x86_64/clang-7.0.2-apple/ncurses-6.0-ny2iyrd374kkzwc2bam5xqvbbkxgmxgv
==> Installing zlib
...
==> Installing xsdk
==> Building xsdk [Package]
==> Successfully installed xsdk
  Fetch: .  Build: 5.20s.  Total: 5.20s.
[+] /Users/gamblin2/src/spack/db/test-tree/darwin-sierra-x86_64/clang-7.0.2-apple/xsdk-xsdk-0.2.0-z6kbxwa7zhza6qhd4jai6q7ggb3jbm43

- setup package could fail if ``setup_dependent_environment`` or other
  routines expected to use executables from dependencies

- xpetsc and boost try to get python config variables in
  `setup_dependent_package`; this would cause them not to be
  fake-installable
- The `deptype_query` argument isn't used anymore -- it's only passed
  around and causes confusion when calling traverse.

- Get rid of it and just keep the `deptypes` argument
- `do_install()` was originally depth-first recursive, and printed "<pkg>
  already installed in ..." multiple times for packages as recursive
  calls encountered them.

- For much cleaner output, use spec.traverse(order='post') to install
  dependencies instead
Copy link
Member

@alalazo alalazo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tgamblin tgamblin merged commit b5e136b into develop Oct 12, 2017
@tgamblin tgamblin deleted the features/better-install-output branch October 12, 2017 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants