[Libguestfs] [PATCH] GuestOS: Fix _is_installed to return 0 if the package isn't installed

Matthew Booth mbooth at redhat.com
Fri Feb 12 16:39:25 UTC 2010


On 12/02/10 14:42, Richard W.M. Jones wrote:
> On Fri, Feb 12, 2010 at 02:22:43PM +0000, Matthew Booth wrote:
>> +        my $error = $g->sh(join(' ', @$rpmcmd).' 2>&1 ||:');
> 
> Do we need more quoting here?
> 
>> +        return 0 if ($error =~ /not installed/);
> 
> I guess this works because LANG=C in the appliance.
> 
> If we ever enabled locales in the appliance it might break though.  It
> could therefore be a good idea to add LANG=C to the beginning of the
> shell command above.
> 
> Rich.
> 

Added more quoting and LANG=C.

Matt
-- 
Matthew Booth, RHCA, RHCSS
Red Hat Engineering, Virtualisation Team

M:       +44 (0)7977 267231
GPG ID:  D33C3490
GPG FPR: 3733 612D 2D05 5458 8A8A 1600 3441 EA19 D33C 3490
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-GuestOS-Fix-_is_installed-to-return-0-if-the-package.patch
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20100212/cb40ba63/attachment.ksh>


More information about the Libguestfs mailing list