On 06-07-11 09:48, no-re...@cfengine.com wrote:
> Forum: CFEngine Help
> Subject: Re: Cfengine Help: Re: Advice on using package promises
> Author: svenXY
> Link to topic: https://cfengine.com/forum/read.php?3,22694,22747#msg-22747
>
> Hi,
>
> sorry to bring this up once more, but there's still stuff to be understood.
>
> Right now I have installed:
>
> subversion 1.4.2-2.el5 x86_64
> subversion 1.4.2-2.el5 i386
>
> What I want now is:
>
> - remove the i386 package (it is not necessary and conflicts with the 1.6.x 
> package - see below)
> - upgrade the x86_64 package to  1.6.11-7.el5
>
> Promise is:
>
>
> packages:
>
>          "subversion"
>             package_policy  =>  "delete",
>             package_method  =>  rpm_version("/tmp"),
>             package_version =>  "1.4.2-2.el5",
>             package_architectures =>  { "i386" },
>             action          =>  actionsettings_fix_inform("inform");
>
>         "subversion"
>              package_policy  =>  "addupdate",
>              package_method  =>  yum_rpm_exact,
>              package_version =>  "1.6.11-7.el5",
>             #package_version =>  "1.4.2-2.el5",
>             package_architectures =>  { "x86_64" },
>             action          =>  actionsettings_fix_inform("inform");
>
>
> but that results in:
>
>
>   ->  Looking for (subversion,*,i386)
> cf3>   ->  Matched name subversion
> cf3>   ->  Matched arch i386
> cf3>   ->  Matched version *
> cf3>   ->  Looking for (subversion,1.4.2-2.el5,i386)
> cf3>   ->  Matched name subversion
> cf3>   ->  Matched arch i386
> cf3>   ->  Check for compatible versioning model in (1.4.2-2.el5,1.4.2-2.el5)
> cf3>   ->  Verified that versioning models are compatible
> cf3>   ->  Verified version constraint promise kept
> cf3>   ->  Package (subversion) already installed and matches criteria 
> (1.4.2-2.el5)
> [...]
> cf3>  Q:yum -y update subver ...:Transaction Check Error:   file 
> /usr/share/man/man1/svn.1.gz from install of subversion-1.6.11-7.el5 
> conflicts with file from package subversion-1.4.2-2.el5
> cf3>  Q:yum -y update subver ...:  file /usr/share/man/man1/svnadmin.1.gz 
> from install of subversion-1.6.11-7.el5 conflicts with file from package 
> subversion-1.4.2-2.el5
> cf3>  Q:yum -y update subver ...:  file /usr/share/man/man1/svnlook.1.gz from 
> install of subversion-1.6.11-7.el5 conflicts with file from package 
> subversion-1.4.2-2.el5
> cf3>  Q:yum -y update subver ...:  file 
> /usr/share/man/man5/svnserve.conf.5.gz from install of 
> subversion-1.6.11-7.el5 conflicts with file from package 
> subversion-1.4.2-2.el5
> cf3>  Q:yum -y update subver ...:  file /usr/share/man/man8/svnserve.8.gz 
> from install of subversion-1.6.11-7.el5 conflicts with file from package 
> subversion-1.4.2-2.el5
> cf3>  Q:yum -y update subver ...:
> cf3>  Q:yum -y update subver ...:
> cf3>   !! Finished command related to promiser "subversion" -- an error 
> occurred (returned 1)
> cf3>  Package schedule execution failed for subversion-1.6.11-7.el5.x86_64
>
>
Sven,

  That is a bug in my code/patch. I tested it a lot with add,addupdate but 
not to delete/remove a package and specify a version number. I am working 
on it. The package is not scheduled for deletion when it matches your 
expression:
{{{
  Package (subversion) already installed and matches criteria (1.4.2-2.el5)
}}}

So when i deletion is specified it must schedule the package for deletion, 
same is true for re-installation.


regards


-- 
********************************************************************
*  Bas van der Vlies                    e-mail: b...@sara.nl       *
*  SARA - Academic Computing Services   Amsterdam, The Netherlands *
********************************************************************
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to