[Libguestfs] [PATCH] GuestOS: Fix _is_installed to return 0 if the package isn't installed
Richard W.M. Jones
rjones at redhat.com
Fri Feb 12 14:42:40 UTC 2010
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.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top
More information about the Libguestfs
mailing list