Iterate on the array directly, instead of converting it to a list to do the same; also, avoid a temporary variable for it. --- v2v/convert_linux.ml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/v2v/convert_linux.ml b/v2v/convert_linux.ml index f9aa334..9941750 100644 --- a/v2v/convert_linux.ml +++ b/v2v/convert_linux.ml @@ -85,9 +85,7 @@ let rec convert ~keep_serial_console (g : G.guestfs) inspect source rcaps = Linux.augeas_init g; (* Clean RPM database. This must be done early to avoid RHBZ#1143866. *) - let dbfiles = g#glob_expand "/var/lib/rpm/__db.00?" in - let dbfiles = Array.to_list dbfiles in - List.iter g#rm_f dbfiles; + Array.iter g#rm_f (g#glob_expand "/var/lib/rpm/__db.00?"); (* What grub is installed? *) let grub_config, grub = -- 2.7.4 _______________________________________________ Libguestfs mailing list [email protected] https://www.redhat.com/mailman/listinfo/libguestfs
