Why don't you want to use package_version?

I would try something like this (untested):

vars:
    'package_version[jdk.x86_64]' string => '2000:1.6.0_17-fcs';

    'package' slist => getindices('package_version');

packages:
    "${package}"
        package_policy => 'add',
        package_method => yum,
        package_version => "${package_version[${package}]",
        package_architectures => { 'x86_64' };

You will also need another promise to warn about or remove packages
that match that name but not that version (if I understand the delete
part of your question correctly).

On Wed, Dec 16, 2009 at 9:43 AM, Patryk Lason <p.la...@cyfronet.pl> wrote:
> Hi,
>
> could you please paste a working example where it is possible to add and
> delete a package with its version and architecture?
>
> I.e. I'd like to add a package "jdk.x86_64" with version "2000:1.6.0_17-fcs"
> and keep it frozen.
>
> # yum list all | grep ^jdk.x86_64
> jdk.x86_64                           2000:1.6.0_17-fcs      sl-security
>
> Is it possible to do it without using "package_version"?
>
> With someting like:
> ---------------------------
> vars:
>   "add_x86_64" slist => { "jdk-2000:1.6.0_17-fcs" };
>
> packages:
>   "$(add_x86_64)"
>      package_policy => "add",
>      package_method => yum,
>      package_architectures => { "x86_64" };
> ---------------------------
>
> Regards,
> Patryk
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@cfengine.org
> https://cfengine.org/mailman/listinfo/help-cfengine
>
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to