search for: get_required_tool

Displaying 13 results from an estimated 13 matches for "get_required_tool".

2017 Mar 22
2
Re: [PATCH 4/5] dib: require a Python interpreter
...> + let python = > + match python with > + | Some exe -> > + let p = > + if Filename.is_relative exe then IIUC what you mean here is "the 'exe' filename doesn't contain any slashes"? That isn't what is written above. > + get_required_tool exe > + else ( > + Unix.access exe [Unix.X_OK]; > + exe > + ) in > + Some p > + | None -> None in Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http:...
2017 Mar 22
7
[PATCH 0/5] dib: initial work to support d-i-b 2.0
...mplement some of the changes needed to support d-i-b 2.0; normal VM distro builds seem to work correctly, ramdisk builds are still broken and require more efforts. Thanks, Pino Toscano (5): dib: implement get_image_element_array stuff dib: export IMAGE_BLOCK_DEVICE_WITHOUT_PART dib: extract get_required_tool out of require_tool dib: require a Python interpreter dib: implement IMAGE_ELEMENT_YAML dib/cmdline.ml | 21 ++++++++++++++++++++- dib/cmdline.mli | 1 + dib/dib.ml | 44 ++++++++++++++++++++++++++++++++++++++++---- dib/utils.ml | 7 +++++-- dib/virt-dib.pod | 11 +++++++++++ 5...
2017 Mar 23
0
[PATCH v5 07/10] dib: move do_cp to mllib.Commun_utils
--- dib/utils.ml | 4 ---- mllib/common_utils.ml | 5 +++++ mllib/common_utils.mli | 3 +++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/dib/utils.ml b/dib/utils.ml index 967754d95..92296d173 100644 --- a/dib/utils.ml +++ b/dib/utils.ml @@ -98,10 +98,6 @@ let get_required_tool tool = let require_tool tool = ignore (get_required_tool tool) -let do_cp src destdir = - let cmd = [ "cp"; "-t"; destdir; "-a"; src ] in - if run_command cmd <> 0 then exit 1 - let ensure_trailing_newline str = if String.length str > 0 &&...
2017 Apr 12
0
[PATCH v6 07/10] dib: move do_cp to mllib.Commun_utils
--- dib/utils.ml | 4 ---- mllib/common_utils.ml | 5 +++++ mllib/common_utils.mli | 3 +++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/dib/utils.ml b/dib/utils.ml index afa2ec944..2fe70e7fc 100644 --- a/dib/utils.ml +++ b/dib/utils.ml @@ -98,10 +98,6 @@ let get_required_tool tool = let require_tool tool = ignore (get_required_tool tool) -let do_cp src destdir = - let cmd = [ "cp"; "-t"; destdir; "-a"; src ] in - if run_command cmd <> 0 then exit 1 - let ensure_trailing_newline str = if String.length str > 0 &&...
2019 Jan 11
0
[PATCH 3/3] OCaml: use the new behaviour of Std_utils.which
...r (f_"at least one distribution root element must be specified"); - let python = - match python with - | Some exe -> - let p = - if String.find exe Filename.dir_sep <> -1 then ( - Unix.access exe [Unix.X_OK]; - exe - ) else - get_required_tool exe in - Some p - | None -> None in + let python = Option.map get_required_tool python in { debug = debug; basepath = basepath; elements = elements; excluded_elements = excluded_elements; element_paths = element_paths; -- 2.17.2
2017 Mar 22
0
[PATCH 4/5] dib: require a Python interpreter
...then ( @@ -246,6 +252,19 @@ read the man page virt-dib(1). if elements = [] then error (f_"at least one distribution root element must be specified"); + let python = + match python with + | Some exe -> + let p = + if Filename.is_relative exe then + get_required_tool exe + else ( + Unix.access exe [Unix.X_OK]; + exe + ) in + Some p + | None -> None in + { debug = debug; basepath = basepath; elements = elements; excluded_elements = excluded_elements; element_paths = element_paths; excluded_scripts = exclude...
2019 Jan 11
3
[PATCH 1/3] mlstdutils: add a very simple test for Std_utils.which
--- common/mlstdutils/std_utils_tests.ml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/common/mlstdutils/std_utils_tests.ml b/common/mlstdutils/std_utils_tests.ml index 81f512cbf..f7b0247a4 100644 --- a/common/mlstdutils/std_utils_tests.ml +++ b/common/mlstdutils/std_utils_tests.ml @@ -29,6 +29,11 @@ let assert_equal_int = assert_equal ~printer:(fun x -> string_of_int x)
2017 Mar 22
0
Re: [PATCH 4/5] dib: require a Python interpreter
...'exe' filename doesn't contain > any slashes"? That isn't what is written above. Yes, sort of. What about something like: let p = try ignore (String.find exe Filename.dir_sep); Unix.access exe [Unix.X_OK]; exe with | Not_found -> get_required_tool exe in Thanks, -- Pino Toscano
2017 Sep 20
8
[PATCH v2 0/6] Fix OCaml dependencies.
v1 -> v2: - Fixed everything mentioned in patch review. - Libdir module is removed as a separate commit. Rich.
2017 Apr 12
12
[PATCH v6 00/10] Add a virt-builder-repository tool
Hi all, Here is an updated version of that patch series. Diff to v5: * Apply Pino's comments * Fix indentation issues * Add a default value for arch in builder/index_parser.ml if template is set * Improved new images filtering: don't process image that didn't change. This has been uncovered by introduction of --no-compression Cédric Bosdonnat (10): lib/osinfo.c:
2017 Mar 23
13
[PATCH v5 00/10] Introducing virt-builder-repository
Hi all, Here is the v5 of my patches series applying the latest comments from Pino. Cédric Bosdonnat (10): lib/osinfo.c: Extract xml processing into a callback lib: extract osinfo DB traversing API mllib: ocaml wrapper for lib/osinfo builder: rename docs test script builder: add a template parameter to get_index builder: add Index.write_entry function dib: move do_cp to
2017 Sep 18
0
[PATCH 2/5] Make sure every *.ml file has a corresponding *.mli file.
...+(** Apply function to each character in the string. If the function + returns true, return the index of the character. + + @raise Not_found if no match *) + +val digit_prefix_compare : string -> string -> int + +val do_mkdir : string -> unit +(** Wrapper around [mkdir -p] *) + +val get_required_tool : string -> string +(** Ensure external program is installed. Return the full path of the + program or fail with an error message. *) + +val require_tool : string -> unit +(** Same as {!get_required_tool} but only checks the external program + is installed and does not return the path....
2017 Sep 18
6
[PATCH 0/5] Fix OCaml dependencies.
This works reliably for me ... Rich.