yum install too many packages

34 views
Skip to first unread message

Leo Liu

unread,
Oct 17, 2014, 9:11:25 PM10/17/14
to help-c...@googlegroups.com
Hi there,

I use CFE3.6.2 and have this promise on centos7 (with EPEL enabled):

packages:
"collectd"
package_policy => "add",
package_method => yum;

but it installs 31 packages starts with collectd.

I tried yum install -y collectd in shell and it only installs one
package.

A bug?

Thanks,
Leo

Ted Zlatanov

unread,
Oct 18, 2014, 12:24:22 PM10/18/14
to help-c...@googlegroups.com
On Sat, 18 Oct 2014 09:11:10 +0800 Leo Liu <sdl...@gmail.com> wrote:

LL> I use CFE3.6.2 and have this promise on centos7 (with EPEL enabled):

LL> packages:
LL> "collectd"
LL> package_policy => "add",
LL> package_method => yum;

LL> but it installs 31 packages starts with collectd.

LL> I tried yum install -y collectd in shell and it only installs one
LL> package.

LL> A bug?

There is no easy fix at the promise level, but the `package_latest`
bundle will do what you need:

https://docs.cfengine.com/docs/master/reference-standard-library-packages.html#package_latest

Ted

Leo Liu

unread,
Oct 18, 2014, 8:30:27 PM10/18/14
to help-c...@googlegroups.com
On 2014-10-18 12:25 -0400, Ted Zlatanov wrote:
> There is no easy fix at the promise level, but the `package_latest`
> bundle will do what you need:
>
> https://docs.cfengine.com/docs/master/reference-standard-library-packages.html#package_latest
>
> Ted

Thanks, that seems to solve the issue. it is using the
yum_rpm_permissive package_method, the doc of which doesn't explain the
meaning of permissive. What is `permissive' in this context?

Thanks,
Leo

Ted Zlatanov

unread,
Oct 20, 2014, 7:23:17 AM10/20/14
to help-c...@googlegroups.com
On Sun, 19 Oct 2014 08:29:51 +0800 Leo Liu <sdl...@gmail.com> wrote:

LL> On 2014-10-18 12:25 -0400, Ted Zlatanov wrote:
>> There is no easy fix at the promise level, but the `package_latest`
>> bundle will do what you need:
>>
>> https://docs.cfengine.com/docs/master/reference-standard-library-packages.html#package_latest

LL> Thanks, that seems to solve the issue. it is using the
LL> yum_rpm_permissive package_method, the doc of which doesn't explain the
LL> meaning of permissive. What is `permissive' in this context?

Normally you have to specify the package version, and it defaults to
"*", which then triggers the bug of installing "xyz-abc" when you ask
for "xyz".

The "permissive" bodies set

package_name_convention => "$(name)";

which is permissive in the sense of not requiring the version. I
couldn't think of a better name at the time I wrote them, sorry :)

Ted

Leo Liu

unread,
Oct 20, 2014, 9:54:34 AM10/20/14
to help-c...@googlegroups.com
On 2014-10-20 07:23 -0400, Ted Zlatanov wrote:
> Normally you have to specify the package version, and it defaults to
> "*", which then triggers the bug of installing "xyz-abc" when you ask
> for "xyz".
>
> The "permissive" bodies set
>
> package_name_convention => "$(name)";
>
> which is permissive in the sense of not requiring the version. I
> couldn't think of a better name at the time I wrote them, sorry :)

Thanks for the explanation.

While browsing the stdlib I noticed the two methods and my guess of
their meanings is opposite to what you have described i.e.
yum_rpm_permissive would install everything related to a package.

Could you add a bit of documentation to the functions so that their
difference is easier to see?

Thanks,
Leo

Ted Zlatanov

unread,
Oct 20, 2014, 10:03:28 AM10/20/14
to help-c...@googlegroups.com
On Mon, 20 Oct 2014 21:54:13 +0800 Leo Liu <sdl...@gmail.com> wrote:

LL> While browsing the stdlib I noticed the two methods and my guess of
LL> their meanings is opposite to what you have described i.e.
LL> yum_rpm_permissive would install everything related to a package.

Yeah, sorry about that. I should have called it `yum_rpm_1` :)

LL> Could you add a bit of documentation to the functions so that their
LL> difference is easier to see?

The masterfiles.git maintainers (I'm not one anymore; Nick could do it
maybe?) should do that, renaming the bodies if they see fit. My previous
note may be helpful.

Ted

Nick Anderson

unread,
Oct 20, 2014, 1:53:53 PM10/20/14
to help-c...@googlegroups.com
On 10/20/2014 09:03 AM, Ted Zlatanov wrote:
> The masterfiles.git maintainers (I'm not one anymore; Nick could do it
> maybe?) should do that, renaming the bodies if they see fit. My previous
> note may be helpful.

Please submit a pull request and tag @nickanderson :)

Ted Zlatanov

unread,
Oct 21, 2014, 2:21:45 PM10/21/14
to help-c...@googlegroups.com
On Mon, 20 Oct 2014 12:53:49 -0500 Nick Anderson <nick.a...@cfengine.com> wrote:

NA> On 10/20/2014 09:03 AM, Ted Zlatanov wrote:
>> The masterfiles.git maintainers (I'm not one anymore; Nick could do it
>> maybe?) should do that, renaming the bodies if they see fit. My previous
>> note may be helpful.

NA> Please submit a pull request and tag @nickanderson :)

Of course. https://github.com/cfengine/masterfiles/pull/342

Ted

Leo Liu

unread,
Oct 21, 2014, 7:16:14 PM10/21/14
to help-c...@googlegroups.com
On 2014-10-21 14:21 -0400, Ted Zlatanov wrote:
> Of course. https://github.com/cfengine/masterfiles/pull/342
>
> Ted

Thanks.

Leo

Nick Anderson

unread,
Oct 21, 2014, 7:25:28 PM10/21/14
to Leo Liu, help-c...@googlegroups.com

Yes indeed, thanks Ted.

Docs are updated: https://docs.cfengine.com/latest/reference-standard-library-packages.html#yum_rpm_permissive

--
You received this message because you are subscribed to the Google Groups "help-cfengine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to help-cfengin...@googlegroups.com.
To post to this group, send email to help-c...@googlegroups.com.
Visit this group at http://groups.google.com/group/help-cfengine.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages