On 09/17/2010 11:09 AM, Davide Brini wrote:
> On Friday 17 Sep 2010 09:59:10 Seva Gluschenko wrote:
> 
>> Davide,
>>
>> as far as I'm known, Cfengine does not analyze package manager exit
>> status. You might check certain file from a package for existence or
>> ask Mark to add exit status recognition :)
> 
> Well that makes it pretty useless doesn't it? How can one detect if the 
> installation failed (or succeeded, for that matter)? Even the documentation 
> itself uses that same exact code (classes => if_ok ...) to make an example of 
> setting a class upon success.
> 
> The documentation says "Package promises are like commands promises in the 
> sense that cfengine promises nothing about the outcome of executing a 
> command. 
> All it can promise is to interface with it, starting it and using the results 
> in good faith. Packages are basically `outsourced', to invoke IT parlance."
> 
> As I read it, "using the result in good faith" should mean "trust the 
> command", including its exit status, which is also (imho) the only possible 
> sensible policy, short of building package management into cfengine.
> 

David, the problem is one of semantics. In bulk operations, some things succeed 
and some
fail. You are entirely slave to the behaviour of the package manager, making it 
difficult
to have a consistent behaviour that everyone can agree on. Installing one by 
one is
inefficient, but possible.

Try to think more about the final (desired) state rather than the outcome of 
the shell
command.

M
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to