rodjek / librarian-puppet

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

Add option to disable transitive dependency resolution #245

Open hopperd opened 10 years ago

hopperd commented 10 years ago

We would like to be able to disable the automatic transitive dependency download that way dependencies are explicit in the Puppetfile. We use Puppet Enterprise in a multi-tenant fashion and want to prevent the automatic pulling of dependencies like stdlib and concat from the forge without or organization. Having a simple option to not resolve the transitive dependencies would be very helpful here.

njam commented 10 years ago

I think we could override fetch_dependencies in both Librarian::Puppet::Source::Local and Librarian::Puppet::Source::Forge to accomplish that.

I can see that the install command is implemented in Librarian::Puppet::Cli and could probably be changed to accept such an argument there (set it to environment and read it when calculating dependencies). The update command seems to be defined in librarian only at the moment afaics.

Did you have in mind rather a CLI argument, or an option to set this in the Puppetfile? Maybe this should even be a librarian feature? @split3 @carlossg wdyt?

carlossg commented 10 years ago

fetch_dependencies is the place to override it

Other options that can be implemented in dsl.rb

hopperd commented 10 years ago

I was thinking more of a CLI option. Putting it in the Puppetfile doesn't seem like a good idea to me as essentially then people wouldn't be getting deterministic results if it was resolving transitive dependencies and then hits a file that has it turned off and those aren't resolved.

reidmv commented 10 years ago

I would definitely want an option in the Puppetfile. The Puppetfile is used as an artifact to reproduce a collection of modules, and if my intention is to not resolve transitive dependencies, I want that reflected in my artifact, not in the un-captured invocation of a command against that artifact.

ghost commented 9 years ago

Any news on this please ? Experiencing long delays whilst librarian is working out dependencies... I agree with the above, if we could get librarian just to check the dependencies where there are versions rather than building a Cartesian loop would be great as a starting point maybe (rather than assuming that it needs to check all dependency references from version 0 to 1 2 3 etc. )

danielserrao commented 6 years ago

Any news about this? I would also like to know if it is possible to ignore dependencies on a specific module version. That would be very useful.

Xylakant commented 6 years ago

@danielserrao quoting from the fine readme:

NOTE This project has moved to https://github.com/voxpupuli/librarian-puppet