rodjek / librarian-puppet

http://librarian-puppet.com
MIT License
693 stars 209 forks source link

Recursive dependencies in "local" modules #257

Closed robinbowes closed 9 years ago

robinbowes commented 9 years ago

I want to use recursive dependencies with "local" modules, something like this:

app/puppetboard:
  requires:
    ../../roles/role_puppetboard

roles/role_puppetboard
  requires:
    ../../profiles/profile_puppetboard
    ../../profiles/profile_common

profiles/profile_common:
  requires:
    ../../profiles/profile_ntp

My top-level Puppetfile (the one in app/puppetboard) looks like this:

#!/usr/bin/env ruby
#^syntax detection

forge "https://forgeapi.puppetlabs.com"

# top-level role
mod 'local-role_puppetboard',
  :path => '../../roles/role_puppetboard'

This works, ie. the role_puppetboard module is copied to app/puppetboard/modules/

In roles/role_puppetboard/Puppetfile, I have this:

#!/usr/bin/env ruby
#^syntax detection

forge "https://forgeapi.puppetlabs.com"

mod 'local-profile_common',
  :path => '../../profiles/profile_common'

mod 'local-profile_puppetboard',
  :path => '../../profiles/profile_puppetboard'

These additional modules are not "seen" by librarian-puppet and not installed.

Am I doing something wrong here, or is this just not supported?

R.

carlossg commented 9 years ago

what version of librarian-puppet and what's the output of --verbose ? there is a test that is passing doing transitive path dependencies at https://github.com/rodjek/librarian-puppet/blob/master/features/install/path.feature#L14

robinbowes commented 9 years ago

Hi Tim,

This is v1.3.2

Here's the verbose output:

  librarian-puppet install --verbose
[Librarian] Ruby Version: 1.9.3
[Librarian] Ruby Platform: x86_64-darwin13.0.2
[Librarian] Rubygems Version: 2.2.2
[Librarian] Librarian Version: 0.1.2
[Librarian] Librarian Adapter: puppet
[Librarian] Librarian Adapter Version: 1.3.2
[Librarian] Project: /Users/robin/Workspace/Clients/ubnt/repos/env-builds.2/ops/puppet/apps/puppetboard
[Librarian] Specfile: Puppetfile
[Librarian] Lockfile: Puppetfile.lock
[Librarian] Git: /opt/boxen/homebrew/bin/git
[Librarian] Git Version: 2.1.1
[Librarian] Git Environment Variables:
[Librarian]   (empty)
[Librarian] Pre-Cached Sources:
[Librarian]   [:path, "../../roles/role_puppetboard", {}]
[Librarian] Post-Cached Sources:
[Librarian]   [:path, "../../roles/role_puppetboard", {}]
[Librarian]   [:forge, "https://forgeapi.puppetlabs.com", {}]
[Librarian] The specfile is unchanged: nothing to do.
[Librarian] Install: dependencies resolved
[Librarian] Pre-Cached Sources:
[Librarian] Post-Cached Sources:
[Librarian]   [:forge, "https://forgeapi.puppetlabs.com", {}]
[Librarian]   [:path, "../../roles/role_puppetboard", {}]
[Librarian] Installing ubnt-role_puppetboard/0.0.1 <../../roles/role_puppetboard>
[Librarian] Copying ../../roles/role_puppetboard to modules/role_puppetboard

It doesn't seem to be even looking in roles/role_puppetboard/Puppetfile

R.

carlossg commented 9 years ago

Try deleting the Puppetfile.lock. If you can create a repo with a minimal example where the problem exists I'll take a look, without the files is hard.

robinbowes commented 9 years ago

How very odd. I was sure I had tried deleting Puppetfile.lock without any success. In fact, I did but I also managed to typo the Puppetfile name as Pupppetfile so I probably didn't fix both things at the same time.

Anyway, I uninstalled 1.3.3 and 1.3.2 seems to work just fine as well.

So, thanks for looking, and sorry for the noise.

R.