Re: [Pkgutil-users] pkgutil noncsw=true
Status: Beta
Brought to you by:
bonivart
|
From: Peter B. <bon...@op...> - 2010-03-02 15:39:47
|
On Tue, Mar 2, 2010 at 4:03 PM, Robert Gstoehl <rob...@gm...> wrote:
> Hey there,
>
> To use pkgutil to install non CSW - prefixed packages, one needs to
> enable this feature by means of adding
>
> noncsw=true to pkgutil.conf.
>
> This switches off the grep:
>
> if ($noncsw) {
> @cswpkgs = `pkginfo`
> } else {
> @cswpkgs = `pkginfo | grep CSW`
> }
>
> And leads finally to a much longer runtime while doing a pkgutil -c
> because of all the SUNW- stuff.
>
> Wouldn't it be nicer if one could add a pattern to pkgutil.conf:
>
> noncsw=/CSW|FOO|BAR/
>
> What do you think?
That may be a good idea! Maybe I need a new option though so there's
no compatibility problems with old pkgutil.conf files. I'll make a
note of it.
As I don't use pkgutil for non-CSW packages myself all support for it
is by request from users and most of the needed changes are
contributed as well.
> I'm hacking on a new puppet provider for pkgutil and rely on the
> pkgutil -c command to get a list of managed resources -> so waiting n
> minutes on the output of pkgutil -c feels kind of clumsy ;)
Try the --single option, it's much faster than waiting for -c to
finish comparing all packages.
# pkgutil -c --single CSWperl
You're not the only one doing work in this area. It's much
appreciated, I just hope it will make it upstream into puppet
officially so all can use it without hacking.
Here's a link to someone elses provider hack:
http://garylaw.net/packages/pkgutil.rb
And another one:
http://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/pkg/puppet/trunk/files/0001-pkgutil-support.patch
I think both are based on the pkg-get provider, basically just
changing the least amount of code to get it working.
I would like to see a proper pkgutil provider picked up by the puppet
project. Including you I know at least three people using puppet with
pkgutil and that are able to make a provider so it shouldn't be
impossible to send a working provider to the puppet guys.
--
/peter
|