catching failures

Jo Rhett <[email protected]>
Newsgroups gmane.comp.sysutils.cfengine.bugs
Message-ID <[email protected]>
On Mar 18, 2008, at 2:05 PM, Eric Searcy wrote:
> By the way Jo, you mentioned how you didn't write the Portage code  
> so you needed to push this off to me.  I checked your FreeBSD code,  
> it looks like you're returning 0 to the caller, which means that if  
> pkg_info can't be called, it defaults to `no match' and will try to  
> go ahead and install.  This should probably be switched to -1 like  
> the above code, as you yourself said it should return failure back  
> to the package manager [1].  (Note, its not just FreeBSD code;  
> looking into this most of the others, and even the default case for  
> no package manager in PackageCheck all return 0.  I'll try to write  
> up a patch to address this.)

I know :-(

I wrote the routine in do.c to catch this possibility, but haven't  
gone back and edited any of the package-manager-specific routines to  
return -1 in case of failure.   Sorry, it's been not hellish, but  
very busy here of late and I keep putting off these changes until I  
can commit enough time to be certain I'm not introducing another bug.

-- 
Jo Rhett
Net Consonance : consonant endings by net philanthropy, open source  
and other randomness
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.