| Moreover, this is needed because (1) it's expected behavior, and (2) otherwise the puppet-coder must build in cyclical dependencies in his package list. Consider:
package { 'npm' : ensure => installed }
|
This will translate to:
will install npm and nodejs. Now consider the coder needs to specify both:
package { 'npm' : ensure => $ensure } |
package { nodejs': ensure => $ensure }
|
What's the proper dependency here? For installation, npm requires nodejs, but for deinstallation, rpm -e will refuse to remove nodejs as long as npm still exists. And vice-versa! nodejs depends by npm: packages can have circular dependencies, but puppet by design disallows that. Other than redesigning puppet to handle circular dependencies, better to let the package managers act as they are designed to. (Note: if puppet could detect a circular dependency, then with the example of rpm and yum, it could try to remove both at the same time. But I think I chose a poor example.) |