search for: string_random8

Displaying 20 results from an estimated 30 matches for "string_random8".

2015 Oct 07
1
Re: [PATCH 5/5] mllib: Replace various ad hoc string_* functions with String.*
...> string_prefix -> String.is_prefix > string_suffix -> String.is_suffix > string_find -> String.find > replace_str -> String.replace > string_nsplit -> String.nsplit > string_split -> String.split > string_lines_split -> String.lines_split > string_random8 -> String.random8 > --- As mentioned yesterday on IRC, I'm torn about this one: the functions would automatically alias functions with the same name, whenever available in OCaml' stdlib. Also (but this is more personal), reading String.foo would make me think that it is part of the...
2015 Mar 18
0
[PATCH 2/2] builder: support for download resume
...let parseduri = try URI.parse_uri uri with Invalid_argument "URI.parse_uri" -> @@ -82,7 +82,6 @@ and download_to ~prog t ?(progress_bar = false) ~proxy uri filename = * atomically rename it to the final filename. *) let filename_new = filename ^ "." ^ string_random8 () in - unlink_on_exit filename_new; (match parseduri.URI.protocol with | "file" -> @@ -115,11 +114,20 @@ and download_to ~prog t ?(progress_bar = false) ~proxy uri filename = if bad_status_code status_code then error (f_"failed to download %s: HTTP status cod...
2016 Oct 31
5
[PATCH 0/4] supermin: use dnf on Mageia
Hi, as pointed out by Neal Gompa, Mageia recently introduced dnf in the distribution (currently only in Cauldron, which is the future Mageia 6), and most probably it will replace urpmi in the future. As such, on Mageia make supermin prefer dnf over urpmi when found, using the same code already used for Fedora. Related change: make test-harder.sh work explicitly also on Mageia
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
2014 Jan 28
1
[PATCH] builder, sysprep: initialise the random generator
virt-builder and virt-sysprep may make use of Common_utils.string_random8 (which uses Random.int) for constructing temporary paths; not initialising the random generator means that every invocation will reuse the same name used previously (!). Thus just call Random.self_init, just like virt-sparsify already does. Expand the test-virt-sysprep-script.sh test to ensure tha...
2015 Feb 27
5
[PATCH 0/4] firstboot: assorted enhancements
This patchset attempts to address a number of shortcomings in the firstboot infrastructure I came across while working with v2v conversion of various Windows VMs. Roman Kagan (4): firstboot: consolidate line ending conversion firstboot: enhance firstboot driver script for Windows firstboot: make script naming descriptive convert_windows: split firstboot into steps
2015 Oct 06
0
[PATCH 5/5] mllib: Replace various ad hoc string_* functions with String.*
...he 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 -> String.split string_lines_split -> String.lines_split string_random8 -> String.random8 --- builder/checksums.ml | 2 +- builder/downloader.ml | 2 +- builder/index_parser.ml | 4 +- builder/paths.ml | 2 +- builder/sigchecker.ml | 12 +- customize/cus...
2015 Oct 06
10
[PATCH 0/5] mllib: Hide bad String functions and miscellaneous refactoring.
Hide/prevent the use of bad string functions like String.lowercase. These are replaced by safe functions that won't break UTF-8 strings. Other miscellaneous refactoring. Rich.
2012 Sep 21
3
[PATCH] sysprep: handle distro specific sysv scripts
..._firstboot_script g root id content = let typ = g#inspect_get_type root in let distro = g#inspect_get_distro root in match typ, distro with | "linux", _ -> - install_service g root; + install_service g distro; let t = Int64.of_float (Unix.time ()) in let r = string_random8 () in let filename = sprintf "%s/scripts/%Ld-%s-%s" firstboot_dir t r id in -- 1.7.12
2014 Nov 24
5
[PATCH] rpm: use librpm's rpmvercmp
Bind and use rpmvercmp to compare versions of packages when sorting them, instead of an own string-based comparison function. --- src/librpm-c.c | 12 ++++++++++++ src/librpm.ml | 1 + src/librpm.mli | 1 + src/rpm.ml | 2 +- 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/librpm-c.c b/src/librpm-c.c index 1ae3bad..fc847d6 100644 --- a/src/librpm-c.c +++
2016 Oct 31
0
[PATCH 4/4] rpm: mageia: prefer dnf over urpmi
...amp; (Os_release.get_id () = "mageia" || try (stat "/etc/mageia-release").st_kind = S_REG with Unix_error _ -> false) @@ -389,7 +388,10 @@ and opensuse_download_all_packages pkgs dir = and mageia_download_all_packages pkgs dir = let tdir = !settings.tmpdir // string_random8 () in - mageia_download_all_packages_with_urpmi pkgs dir tdir; + if Config.dnf <> "no" then + download_all_packages_with_dnf pkgs dir tdir + else (* Config.urpmi <> "no" && Config.fakeroot <> "no" *) + mageia_download_all_packages_w...
2014 Nov 24
0
[PATCH] rpm: isolate the "packages as NA RPM list" code
...;%s.%s" name arch - ) rpms in + let rpms = pkgs_as_NA_rpms pkgs in let cmd = sprintf "%s download --destdir %s %s" @@ -326,11 +318,7 @@ let rec fedora_download_all_packages pkgs dir = and opensuse_download_all_packages pkgs dir = let tdir = !settings.tmpdir // string_random8 () in - let rpms = List.map rpm_of_pkg (PackageSet.elements pkgs) in - let rpms = List.map ( - fun { name = name; arch = arch } -> - sprintf "%s.%s" name arch - ) rpms in + let rpms = pkgs_as_NA_rpms pkgs in let is_zypper_1_9_14 = !zypper_major > 1 @@ -399,6...
2015 Feb 27
0
[PATCH 1/4] firstboot: consolidate line ending conversion
...// "firstboot.bat") (unix2dos firstboot_script); (* Open the SYSTEM hive. *) let systemroot = g#inspect_get_windows_systemroot root in @@ -284,7 +283,7 @@ let add_firstboot_script (g : Guestfs.guestfs) root i content = let t = Int64.of_float (Unix.time ()) in let r = string_random8 () in let filename = sprintf "%s/scripts/%04d-%Ld-%s.bat" firstboot_dir i t r in - g#write filename content + g#write filename (unix2dos content) | _ -> error (f_"guest type %s/%s is not supported") typ distro -- 2.1.0
2015 Mar 23
1
[PATCH v4] [RFE] virt-builder should support download resume
This adds support for resuming downloads in virt-builder. Partially downloaded image 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. Fixes RHBZ#1198344 Ammended for forgotten unlink_on_exit and fixed call with optional aguments. Maros Zatko (1):
2015 Mar 23
2
[PATCH v3] [RFE] virt-builder should support download resume
This 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. Fixes RHBZ#1198344 Ammended for forgotten unlink_on_exit. Maros Zatko (1): builder: support for download resume
2015 Mar 20
2
[PATCH] [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. Fixes RHBZ#1198344 *** BLURB HERE *** Maros Zatko (1): builder: support for download resume
2013 Aug 16
3
[PATCH v2] sysprep: added --mount-options option to mount selected
Nikita, Please take a look at the attached patch. I have rewritten it a little, and only lightly tested it. Rich.
2014 Feb 11
4
[PATCH 0/3] virt-builder: copy local files instead of using curl
Hi, this patch serie does a small optimisation in virt-builder, i.e. make its internal Downloader just copy files when the source is a local URI, instead of spawn curl in this case too. Pino Toscano (3): builder: isolate C libraries in an own OCAMLCLIBS builder: prepare for different per-protocol download actions builder: do a copy when downloading local files builder/Makefile.am | 13
2012 Aug 16
5
[PATCH 0/4] Add customization capabilities to virt-sysprep
In the TODO file there's a discussion of perhaps writing a new 'virt-customize' tool. I think it's probably better (or at any rate, easier) to just add this functionality into virt-sysprep. That is what this small series of patches aims to achieve. Note these are not very well tested at the moment. The first patch adds a generic and useful '--firstboot' flag. The
2012 Apr 06
2
[PATCH] virt-sysprep:add logging feature
...r/lib/yum/uuid" in + g#rm file + logging show_log "Deleted %s\n" file + with G.Error _ -> ()); [] ) else [] diff --git a/sysprep/utils.ml b/sysprep/utils.ml index dfac57d..55c695a 100644 --- a/sysprep/utils.ml +++ b/sysprep/utils.ml @@ -69,3 +69,7 @@ let string_random8 = String.make 1 c ) [1;2;3;4;5;6;7;8] ) + +let logging show_log list = + if show_log then + eprintf list -- 1.7.10.rc3