Displaying 20 results from an estimated 2000 matches similar to: "[PATCH 1/2] mllib: add helper mkdir_p"
2015 Aug 11
3
[PATCH 1/2] mllib: add normalize_arch helper
Small helper to normalize an architecture string, so it is easier to
compare them and check for compatibilities.
Make use of it in guest_arch_compatible, simplifying it.
---
mllib/common_utils.ml | 12 ++++++++++--
mllib/common_utils.mli | 5 +++++
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml
index f9e8996..ca6d470 100644
---
2015 Jan 16
2
[PATCH 1/2] mllib: add simple qemu filename sanitizing function
It mimics a bit in OCaml the logic used in
commit a95214b1985e694946e3426120a6fdc13a3f081f (for the main library)
and commit 588af1953e5f7ab74009b9175cc5d3efb8bb651a (in disk-create),
so in OCaml tools direct calls to qemu/qemu-img with filenames provided
by the user can properly handle filenames with e.g. ':'.
---
mllib/common_utils.ml | 13 +++++++++++++
mllib/common_utils.mli | 8
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
2015 Mar 18
0
[PATCH 1/2] mllib: allow external_command to return on nonzero return value
This is useful for probing probing for cache files such as:
external_command ?ignore_error:(Some true) ~prog "ls .cache/something.*"
will return command output (matched 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
2015 Aug 11
0
Re: [PATCH 1/2] mllib: add normalize_arch helper
On Tue, Aug 11, 2015 at 03:45:11PM +0200, Pino Toscano wrote:
> Small helper to normalize an architecture string, so it is easier to
> compare them and check for compatibilities.
>
> Make use of it in guest_arch_compatible, simplifying it.
Have a look at:
8864c47b94cf44ac2d0d8d4b5019073ad1da121b
> mllib/common_utils.ml | 12 ++++++++++--
> mllib/common_utils.mli | 5 +++++
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
2015 Aug 11
1
Re: [PATCH 1/2] mllib: add normalize_arch helper
On Tuesday 11 August 2015 15:05:04 Richard W.M. Jones wrote:
> On Tue, Aug 11, 2015 at 03:45:11PM +0200, Pino Toscano wrote:
> > Small helper to normalize an architecture string, so it is easier to
> > compare them and check for compatibilities.
> >
> > Make use of it in guest_arch_compatible, simplifying it.
>
> Have a look at:
>
2015 Jul 01
0
[PATCH 2/3] mllib: add and use last_part_of
Collect this small snippet to get the part of a string after the last
occurrency of a character; replace with it the current snippets doing
the same.
Should be just code motion.
---
customize/password.ml | 4 +---
mllib/common_utils.ml | 5 +++++
mllib/common_utils.mli | 3 +++
sysprep/sysprep_operation_user_account.ml | 4 +---
2015 Jul 01
0
Re: [PATCH 1/2] mllib: add and use last_part_of
On Wed, Jul 01, 2015 at 05:49:06PM +0200, Pino Toscano wrote:
> Collect this small snippet to get the part of a string after the last
> occurrency of a character; replace with it the current snippets doing
> the same.
>
> Should be just code motion.
> ---
> customize/password.ml | 5 +++--
> mllib/common_utils.ml | 7 +++++++
>
2015 Jul 01
1
Re: [PATCH 1/2] mllib: add and use last_part_of
On Wednesday 01 July 2015 17:36:20 Richard W.M. Jones wrote:
> On Wed, Jul 01, 2015 at 05:49:06PM +0200, Pino Toscano wrote:
> > Collect this small snippet to get the part of a string after the last
> > occurrency of a character; replace with it the current snippets doing
> > the same.
> >
> > Should be just code motion.
> > ---
> >
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
2015 Mar 05
0
[PATCH v2] customize: add --truncate-recursive option
Allows user to recursively truncate files in PATH. e.g.:
virt-builder --truncate-recursive /var/log
Relates to RHBZ#119673
---
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(-)
diff --git a/builder/cmdline.ml
2015 Jul 01
4
[PATCH 1/2] mllib: add and use last_part_of
Collect this small snippet to get the part of a string after the last
occurrency of a character; replace with it the current snippets doing
the same.
Should be just code motion.
---
customize/password.ml | 5 +++--
mllib/common_utils.ml | 7 +++++++
mllib/common_utils.mli | 3 +++
sysprep/sysprep_operation_user_account.ml | 5 +++--
2015 Feb 23
0
[PATCH 2/2] builder: use mkdir_p to create the cachedir (RHBZ#1195204)
---
builder/cache.ml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builder/cache.ml b/builder/cache.ml
index 9e69bc1..86ac41b 100644
--- a/builder/cache.ml
+++ b/builder/cache.ml
@@ -35,7 +35,7 @@ type t = {
let create ~verbose ~directory =
if not (is_directory directory) then
- mkdir directory 0o755;
+ mkdir_p directory 0o755;
{
verbose = verbose;
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
2015 Jul 01
5
[PATCH 1/3] mllib: add an optional filter for rm_rf_only_files
This way it is possible to use rm_rf_only_files, but not removing
specific files.
---
mllib/common_utils.ml | 8 +++++++-
mllib/common_utils.mli | 5 ++++-
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml
index 516cff3..3737b4c 100644
--- a/mllib/common_utils.ml
+++ b/mllib/common_utils.ml
@@ -640,13 +640,19 @@ let rmdir_on_exit =
*
2017 Apr 12
1
[PATCH] mllib: Bind %identity C primitive to Common_utils.identity.
---
mllib/common_utils.ml | 2 ++
mllib/common_utils.mli | 2 ++
mllib/xpath_helpers.ml | 2 --
v2v/input_vmx.ml | 2 --
v2v/v2v_unit_tests.ml | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml
index 63d8dd92e..6a9b08973 100644
--- a/mllib/common_utils.ml
+++ b/mllib/common_utils.ml
@@ -282,6 +282,8 @@ let ( /^ ) =
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
---
2017 Mar 07
0
[PATCH v4 8/9] mllib: add do_mv helper function to Common_utils
---
mllib/common_utils.ml | 6 ++++++
mllib/common_utils.mli | 5 ++++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml
index 945728b5e..7932707c9 100644
--- a/mllib/common_utils.ml
+++ b/mllib/common_utils.ml
@@ -1172,3 +1172,9 @@ let do_cp src destdir =
let cmd = [ "cp"; "-t"; destdir; "-a"; src ] in
2017 Mar 23
0
[PATCH v5 08/10] mllib: add do_mv helper function to Common_utils
---
mllib/common_utils.ml | 6 ++++++
mllib/common_utils.mli | 3 +++
2 files changed, 9 insertions(+)
diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml
index 945728b5e..7932707c9 100644
--- a/mllib/common_utils.ml
+++ b/mllib/common_utils.ml
@@ -1172,3 +1172,9 @@ let do_cp src destdir =
let cmd = [ "cp"; "-t"; destdir; "-a"; src ] in
if run_command