Perhaps I'm being dense, but I don't follow how your response relates to
managing packages that have circular deps in puppet.
The original question was how to delete two packages with circular deps
using puppet. The correct answer is to ensure "purged". The problem
with that answer is that it invokes yum multiple times per puppet-run,
which incurs many catalog-downloads from redhat servers, which results
in blacklisting by redhat. There's a patch that would provide a second
option, batched transactions implemented via rpm. If accepted, that
patch would enable a common use-case that is an epic pain to handle in
puppet right now. I'm sure there are other ways to handle the problem,
but this one has a patch pending review which means there's a good
chance that it could be easily implemented for the next release. It
also has performance benefits and no technical downside that has been
identified.
I have no opinions about whether yum or rpm is superior in the general
case, or whether it would be better for puppet to interface directly
with librpm, or whether it's better to allow automatic dependency
resolution or to require admins to specify package-deps manually.
Cheers,
Mike Lococo
On 08/25/2011 06:29 PM, R P Herrold wrote:
On Thu, 25 Aug 2011, Mike Lococo wrote:
2) You must understand how the yum and rpm os commands work, and
specifically how they each handle dependencies and circular deps
(yum works to satisfy deps, rpm fails unless all deps are specified
on a single command-line).
The use of verb forms projecting overtones of virtues or deficiency is
overstated here. You might have well said:
yum will 'do what I mean, not what I said' even if it
would result in a useless installation and
recklessly add and remove whole swaths of packages to
satisfy deps; rpm will carefully limit itself to not
going beyond what is asked to protect your system until
the person seeking the transaction enumerates all deps
in a single command trasaction
Each program is just a mindless tool, with no capacity for for
beneficence or malice.
Both tools use the RPM database, accessible through 'librpm', and of
course Puppet might be extended to consult this database natively rather
than resorting to the present rather ugly 'exec' command which ignores
this source of information [thus forcing a need for knowledge of th4
package state and dependency trees of all potentially packages to
manage, exterior to a specific machine into the equasion]
The program design for Yum is not enabled to proceed to perform a
transaction without the general explicit confirmation with the '-y'
command line option [applicable to both additions and removals, assuning
it has been provided a set of 'repositories' with 'closure']
RPM (as shipped by Red Hat) is designed to not add or remove packages
which have leaf node dependencies beneath it without being explicitly
instructed to ignore such potential error conditions: the --nodeps and
--force options. The issue of automated package retrieval and dependency
is partially out of scope for RPM in the for under which Red hat
presently ships it, but can be done inder alternative vendor's
approaches, with a so called 'rpmdb' database
-- Russ herrold
--
You received this message because you are subscribed to the Google Groups "Puppet
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.