search for: 76d8b79

Displaying 5 results from an estimated 5 matches for "76d8b79".

Did you mean: 768379
2015 Feb 23
3
[PATCH 1/2] mllib: add helper mkdir_p
Small function to create in OCaml-based code a directory and its parents, much like `mkdir -p`. --- mllib/common_utils.ml | 11 +++++++++++ mllib/common_utils.mli | 3 +++ 2 files changed, 14 insertions(+) diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml index 898be17..76d8b79 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -673,3 +673,14 @@ let qemu_input_filename filename = "./" ^ filename else filename + +let rec mkdir_p path permissions = + try Unix.mkdir path permissions + with + | Unix.Unix_error (Unix.EEXIST, _, _) ->...
2015 Mar 05
0
[PATCH v2] customize: add --truncate-recursive option
...= "\ +This command recursively truncates all files under \"path\" to zero-length."; + }; + { op_name = "timezone"; op_type = String "TIMEZONE"; op_discrim = "`Timezone"; diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml index 76d8b79..0219b7e 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -619,6 +619,14 @@ let rm_rf_only_files (g : Guestfs.guestfs) dir = List.iter g#rm files ) +let truncate_recursive (g : Guestfs.guestfs) dir = + if g#is_dir dir then ( + let files = Array.map (Filename.concat di...
2015 Mar 18
0
[PATCH 1/2] mllib: allow external_command to return on nonzero return value
...ched files) on its success or empty list whenits exit code is other than 0 (there are no such files). --- mllib/common_utils.ml | 15 ++++++++++----- mllib/common_utils.mli | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml index 76d8b79..9719b16 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -528,23 +528,28 @@ let compare_lvm2_uuids uuid1 uuid2 = loop 0 0 (* Run an external command, slurp up the output as a list of lines. *) -let external_command ~prog cmd = +let external_command ~prog ?(ignore_error = fal...
2015 Mar 05
2
[PATCH v2] customize: add --truncate-recursive option
Allows user to recursively truncate all files in a directory. Related to RHBZ#119673 Maros Zatko (1): customize: add --truncate-recursive option builder/cmdline.ml | 3 ++- customize/customize_run.ml | 4 ++++ generator/customize.ml | 8 ++++++++ mllib/common_utils.ml | 8 ++++++++ mllib/common_utils.mli | 2 ++ 5 files changed, 24 insertions(+), 1 deletion(-) -- 1.9.3
2015 Mar 18
5
[PATCH 0/2] [RFE] virt-builder should support download resume
This patchset adds support for resuming downloads in virt-builder. Partially downloaded file is not deleted on exit anymore. There is a check for partially downloaded image in cache directory based on its name. When found, download_to crafts appropriate options to continue its download. Maros Zatko (2): mllib: allow external_command to return [] on nonzero return value builder: support for