similar to: [PATCH] mllib: move which and its exception from dib

Displaying 20 results from an estimated 4000 matches similar to: "[PATCH] mllib: move which and its exception from dib"

2017 Apr 07
1
[PATCH 1/2] mllib: add new Common_utils.run_commands
Mostly modelled after a snippet implemented in dib, it is an helper function to run multiple commands in parallel, waiting for all of them at once, and returning all their exit codes. It is possible to pass custom descriptors for collecting stdout and stderr of each command. Common_utils.run_command is adapted to use it, so all the existing code using it keeps working. Add a simple unit tests
2017 Jun 20
2
[PATCH v2 1/2] mllib: add new Common_utils.run_commands
Mostly modelled after a snippet implemented in dib, it is an helper function to run multiple commands in parallel, waiting for all of them at once, and returning all their exit codes. It is possible to pass custom descriptors for collecting stdout and stderr of each command. Common_utils.run_command is adapted to use few helper methods used by run_commands, so all the existing code using it
2016 May 23
0
[PATCH 4/5] mllib: move stringify_args from dib
Move the make_dib_args helper function to Common_utils as stringify_args, so it can be used also within Common_utils itself. This is mostly code motion. --- dib/dib.ml | 12 +----------- mllib/common_utils.ml | 10 ++++++++++ mllib/common_utils.mli | 4 ++++ 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/dib/dib.ml b/dib/dib.ml index b988f14..a76eb5e 100644 ---
2016 Aug 02
0
[PATCH] mllib: check for executable existance in run_command (RHBZ#1362357)
run_command uses Unix.create_process which forks a child process, and executes execve: the latter fails when the executable does not exist, triggering the exit which, in older OCaml versions [1], also runs the at_exit handlers. Since there is not much that can be done to avoid this on the OCaml side, to keep run_command working also in older OCaml version then manually search for the existance of
2016 May 23
7
[PATCH 1/5] mllib: make external_command echo the command executed
Add an optional parameter to disable this behaviour, so the Curl module in v2v won't print user-sensible data (like passwords). --- builder/checksums.ml | 1 - builder/downloader.ml | 1 - builder/sigchecker.ml | 1 - mllib/common_utils.ml | 4 +++- mllib/common_utils.mli | 7 +++++-- v2v/curl.ml | 2 +- 6 files changed, 9 insertions(+), 7 deletions(-) diff --git
2016 May 23
0
[PATCH 5/5] mllib: add a new run_command helper
Add a simple helper to run a command from a sequence of arguments, without using a shell: this should help reducing the amount of quoting ineeded, since arguments are passed straight as such. Make use of it in the places currently using shell_command, and which don't assume they can run anything (so no shell redirections, `env`, etc). --- builder/builder.ml | 62
2017 Mar 07
0
[PATCH v4 7/9] 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 da5e738ad..e769ebe28 100644 --- a/dib/utils.ml +++ b/dib/utils.ml @@ -95,10 +95,6 @@ let require_tool tool = with Executable_not_found tool -> error (f_"%s needed but not found")
2016 Sep 23
2
[PATCH 1/2] mllib: move remove_duplicates from v2v
Simple code motion. --- mllib/common_utils.ml | 9 +++++++++ mllib/common_utils.mli | 6 ++++++ v2v/utils.ml | 9 --------- v2v/utils.mli | 3 --- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml index 81d8202..78618f5 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -297,6 +297,15 @@ let sort_uniq
2017 Jun 15
0
[PATCH v6 04/41] mllib: Split ‘Common_utils’ into ‘Std_utils’ + ‘Common_utils’.
The new module ‘Std_utils’ contains only functions which are pure OCaml and depend only on the OCaml stdlib. Therefore these functions may be used by the generator. The new module is moved to ‘common/mlstdutils’. This also removes the "<stdlib>" hack, and the code which copied the library around. Also ‘Guestfs_config’, ‘Libdir’ and ‘StringMap’ modules are moved since these are
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
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
2016 Sep 23
0
[PATCH 2/2] dib: use remove_duplicates instead of own code
Use a common function to remove duplicates in an unsorted list. Just refactoring, with no behaviour change. --- dib/cmdline.ml | 2 +- dib/utils.ml | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/dib/cmdline.ml b/dib/cmdline.ml index 1fd6c71..144e5a7 100644 --- a/dib/cmdline.ml +++ b/dib/cmdline.ml @@ -107,7 +107,7 @@ read the man page virt-dib(1). let formats =
2015 May 29
0
[PATCH v3] RFC: New virt-dib tool
virt-dib is a new tool to run the elements of diskimage-builder using libguestfs. --- More or less stable now, although with debug stuff here and there; needs initial review, for being included. I would like to have it reviewed at this point, so it can be broadly used. TODO items open: - improve the documentation - review - getting more testing (although it has been successfully tested for
2015 Jul 03
1
[PATCH v5] New tool: virt-dib
virt-dib is a new tool to run the elements of diskimage-builder using libguestfs. --- .gitignore | 5 + Makefile.am | 3 +- appliance/packagelist.in | 12 + configure.ac | 1 + dib/Makefile.am | 144 ++++++++ dib/cmdline.ml | 242 +++++++++++++ dib/dib.ml | 920 +++++++++++++++++++++++++++++++++++++++++++++++
2015 Jun 16
2
[PATCH v4] RFC: New tool: virt-dib
virt-dib is a new tool to run the elements of diskimage-builder using libguestfs. --- I would like to have it reviewed at this point, so it can be used. Documentation and code can be improved and polished following feedback. .gitignore | 5 + Makefile.am | 3 +- appliance/packagelist.in | 7 + configure.ac | 1 + dib/Makefile.am | 144
2015 Oct 06
0
[PATCH 5/5] mllib: Replace various ad hoc string_* functions with String.*
This is just a straight refactoring. Various ad hoc string_* functions that appeared in Common_utils have been renamed and placed in the String.* namespace. The old vs "new" functions are: string_prefix -> String.is_prefix string_suffix -> String.is_suffix string_find -> String.find replace_str -> String.replace string_nsplit -> String.nsplit string_split
2017 Apr 25
1
Re: [PATCH v6 07/10] dib: move do_cp to mllib.Commun_utils
On Wednesday, 12 April 2017 14:33:09 CEST Cédric Bosdonnat wrote: > --- > dib/utils.ml | 4 ---- > mllib/common_utils.ml | 5 +++++ > mllib/common_utils.mli | 3 +++ > 3 files changed, 8 insertions(+), 4 deletions(-) It looks like virt-builder-repository does not use do_cp anymore, so this patch can be put aside for now. -- Pino Toscano
2017 Jun 20
0
[PATCH v2 2/2] dib: use Common_utils.run_commands
Use the new helper for spawning parallel commands, and redirecting their stdout to file. --- dib/dib.ml | 42 ++++++++++-------------------------------- 1 file changed, 10 insertions(+), 32 deletions(-) diff --git a/dib/dib.ml b/dib/dib.ml index 8d078aa..eca47fa 100644 --- a/dib/dib.ml +++ b/dib/dib.ml @@ -980,45 +980,23 @@ let main () = List.iter ( fun fn -> message
2016 Dec 08
4
[PATCH] generator: Share Common_utils code.
For a very long time we have maintained two sets of utility functions, in mllib/common_utils.ml and generator/utils.ml. This changes things so that the same set of utility functions can be shared with both directories. It's not possible to use common_utils.ml directly in the generator because it provides several functions that use modules outside the OCaml stdlib. Therefore we add some
2016 Aug 23
1
[PATCH] mllib: do not assume $PATH is set
Make 'which' gracefully handle the case where $PATH is not set (it will raise Executable_not_found, but that is the expected thing to do). Related to RHBZ#1367839. --- mllib/common_utils.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml index fdca713..9210cf8 100644 --- a/mllib/common_utils.ml +++