Comments (5)
I'm not quite sure on this one. Not all taps should come before all homebrew packages: assume some manifest installs fifty packages, twenty-five of which from one tap and twenty-five from another. In this case, clearly each group should begin installing based on only their own tap requirement; a failure to tap one of the resources should not prevent the other twenty-five from installing.
As for making it opt-in-able: maybe, though that will require somewhat of a refactor. I'll play with it a bit.
For now, I'd recommend setting your resource dependencies, eg.
package { 'neovim/neovim':
ensure => present,
provider => tap,
} ->
package { 'neovim':
ensure => present,
provider => homebrew,
}
from puppet-homebrew.
I agree with that proviso. I suggested that "all taps should come before all packages" since it is the (perhaps naïvely) easiest way to implement the desired functionality, but if there's some package-granular way of modeling "package X depends on tap Y" then that could be used to ensure that the ordering was . . . I'm not sure if "efficient" is the right word, but perhaps "as lazy as possible"?
However, if that granular modeling can not be achieved, it seems like fragility is preferable here. Say you have two taps, a
and b
, and two packages: c
(which depends on tap a
) and d
(which depends on tap b
). Say tap a
succeeds its installation, but b
does not. If you continue installing packages, you run the risk of installing a d
package from a different tap (that's my understanding of how Homebrew handles name conflicts, and it may well be wrong--it may require explicit tap specification with the tap/package-name
convention), which may introduce undesired behavior silently.
from puppet-homebrew.
An additional 100% subjective opinion: Puppet libs shouldn't be built for a partially-failing-apply case; they should be built for the successful-apply case, and should fail as sensibly as possible. That failure might entail bailing out of all subsequent package installs. For example, if yum
fails to blow away its cache successfully at the beginning of manifest application, all packages fail (though that may have changed in recent releases; I'm testing yum
-based packaging on a pretty old CentOS env).
from puppet-homebrew.
Marking this as wontfix as I think it's the job of the user to enforce relationship ordering rather than the library. See attached PR for the methods of achieving this; similar to your example, you should be able to use
Package <| provider == tap |> -> Package <| |>
to accomplish your goal.
from puppet-homebrew.
Sounds good, thanks!
from puppet-homebrew.
Related Issues (20)
- Update functionality does not work as expected HOT 3
- Fix bug for incomplete brew installations
- Handle better brew outputs
- /usr/local immutable on High Sierra
- Silently fails to install a package on first run of Puppet HOT 1
- /usr/local under High Sierra HOT 7
- executing brew info from within puppet fails, but doing it manually in the shell works HOT 2
- Run brew commands from `/tmp` or similar public folder
- Unable to install from URL with mixed-case HOT 2
- Unable to install java8 due to sudo asking for password HOT 1
- Notify error when brew user has no privileges on cwd HOT 1
- fix puppet6 dependencies HOT 1
- fix PDK build in CI HOT 2
- privileged installers HOT 1
- Brewcask provider no longer works
- Dependency and Compatibility Versions HOT 1
- module doesn't support M1 installations HOT 6
- Unclear docs/recommendations for running as root (or not)
- Apple M1 Chip is installing Brew to usr/local/bin instead of /opt/homebrew
- Use proper homebrew installation script
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puppet-homebrew.