On Nov 30, 12:30 pm, deet <[email protected]> wrote:
>   Hello.
>   I would like to make a request for the addition of a new parameter
> within the package resource.  This feature would only be used by
> Solaris puppet users.   The requested enhancement would add an
> interface into native "pkgadd" feature.
>   The new parameter which I have been calling "pkginst" (indifferent
> about parameter name) offers the ability to install a subset of
> packages or all packages contained within 1 datastream package file.
> For example if I had a datastream package file called "s10-
> dinner-3.18e-i86pc" which contained the packages "appetizer", "salad",
> "dinner" and "desert".    Most of the time the end user would want to
> install all of the sub packages within "s10-dinner-3.18e-i86pc" as the
> individual packages really make up the entire logical application or
> service.   That would be accomplished with the following markup
>
>   #  In this example we install "all" of the sub packages of the
> "dinner" package.
>   #  the most common usage for the pkginst parameter.
> package { "dinner":,
>            adminfile    => "/etc/pkgadmin",
>            source       => "/var/tmp/s10-dinner-3.18e-i86pc",
>            ensure       => installed,
>            pkginst      => "all",
>         }
>
>   # In this example we install everything but the "desert" package
> because we
>   # had too many deserts over the holiday
> package { "dinner":,
>            adminfile    => "/etc/pkgadmin",
>            source       => "/var/tmp/s10-dinner-3.18e-i86pc",
>            ensure       => installed,
>            pkginst      => [ "appetizer", "dinner", "salad" ]
>         }
>
>    Thanks.  Derek.

I'm not a core developer, but from my understanding of the package
system, each instance of your provider class represents a single
package, and it's the instance of the provider class that installs the
package.  Things like upgrades, prefetching, and uninstallation depend
on this. If you (taking your example) want to install "all" packages
from a specific source, and then remove or upgrade one of them, this
wouldn't be able to provide that information.  What about if you
wanted to uninstall "dinner", how does puppet figure out if you mean
the pkginst item or the package type item.

I think the difference you're recognizing is that cfengine collects
all packages that need to get upgraded or installed onto one command
line where as puppet will run the install() method for each individual
package.  AIX packages work the same way, there are multiple packages
in a single fileset, so more than one package can be specified on the
command line.

What's wrong with doing:

package { [ "appetizer", "dinner", "salad" ]:
    adminfile    => "/etc/pkgadmin",
    source       => "/var/tmp/s10-dinner-3.18e-i86pc",
    ensure       => installed
}

It will generate 3 pkgadd commands, but it'll reduce the code in your
manifests.  I think the more general solution would be to collect all
the packages for a given source that need to be upgraded/installed and
run one command each source.

-Andrew

--

You received this message because you are subscribed to the Google Groups 
"Puppet Developers" 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-dev?hl=en.


Reply via email to