rodjek / librarian-puppet

http://librarian-puppet.com
MIT License
694 stars 216 forks source link

Bad indentation with "--verbose" install #276

Open bvis opened 9 years ago

bvis commented 9 years ago

I find quite useful the "--verbose" option to see what is Librarian Puppet doing internally. But the indentation shown when it is resolving dependencies recursively is not correct and it makes difficult to see the dependency tree.

Puppetfile

forge "http://puppet-forge.redtonic"

mod 'tester/tester'

Puppetfile.lock

FORGE
  remote: http://puppet-forge.redtonic
  specs:
    puppetlabs-inifile (1.2.0)
    tester-tester (0.1.0)
      puppetlabs-inifile (>= 0)
      tester-tester_dependency1 (>= 0)
    tester-tester_dependency1 (0.1.0)

DEPENDENCIES
  tester-tester (>= 0)

As you may see the "tester/tester" module has two dependencies, and the system is doing the job correctly, but the verbose output shows it like the "tester/tester-dependency1" is an inner dependency of the "puppetlabs/inifile".

Execute the install

# librarian-puppet install --no-use-v1-api --verbose
[Librarian] Ruby Version: 1.9.3
[Librarian] Ruby Platform: x86_64-linux
[Librarian] Rubygems Version: 2.4.5
[Librarian] Librarian Version: 0.1.2
[Librarian] Librarian Adapter: puppet
[Librarian] Librarian Adapter Version: 2.0.1
[Librarian] Project: /etc/puppet
[Librarian] Specfile: Puppetfile
[Librarian] Lockfile: Puppetfile.lock
[Librarian] Git: /usr/bin/git
[Librarian] Git Version: 1.7.11.3
[Librarian] Git Environment Variables:
[Librarian]   (empty)
[Librarian] Pre-Cached Sources:
[Librarian] Post-Cached Sources:
[Librarian]   [:forge, "http://puppet-forge.redtonic", {}]
[Librarian] Resolving tester-tester (>= 0) <http://puppet-forge.redtonic>
[Librarian]   Checking manifests
[Librarian]   Module tester-tester found versions: 0.1.0
[Librarian]     Checking tester-tester/0.1.0 <http://puppet-forge.redtonic>
[Librarian]       Resolving puppetlabs-inifile (>= 0) <(no source specified)>
[Librarian]         Checking manifests
[Librarian]   Module puppetlabs-inifile found versions: 1.2.0, 1.1.4, 1.1.3, 1.1.2, 1.1.1, 1.1.0, 1.0.4, 1.0.3, 1.0.1, 1.0.0
[Librarian]           Checking puppetlabs-inifile/1.2.0 <http://puppet-forge.redtonic>
[Librarian]             Resolving tester-tester_dependency1 (>= 0) <(no source specified)>
[Librarian]               Checking manifests
[Librarian]   Module tester-tester_dependency1 found versions: 0.1.0
[Librarian]                 Checking tester-tester_dependency1/0.1.0 <http://puppet-forge.redtonic>
[Librarian]                   Resolved tester-tester_dependency1 (>= 0) <(no source specified)> at tester-tester_dependency1/0.1.0 <http://puppet-forge.redtonic>
[Librarian]               Resolved tester-tester_dependency1 (>= 0) <(no source specified)>
[Librarian]             Resolved puppetlabs-inifile (>= 0) <(no source specified)> at puppetlabs-inifile/1.2.0 <http://puppet-forge.redtonic>
[Librarian]         Resolved puppetlabs-inifile (>= 0) <(no source specified)>
[Librarian]       Resolved tester-tester (>= 0) <http://puppet-forge.redtonic> at tester-tester/0.1.0 <http://puppet-forge.redtonic>
[Librarian]   Resolved tester-tester (>= 0) <http://puppet-forge.redtonic>
[Librarian] Bouncing Puppetfile.lock
[Librarian] Install: dependencies resolved
...

It's not a real mess in this example but when you have so many recursive dependencies the indentation is as high as make the output totally unreadable.

jdbevan commented 9 years ago

I'll second this.

Most of the time the --verbose option is very difficult to read when there are a lot of modules with a lot of dependencies.