Displaying 20 results from an estimated 45 matches for "rev_int".
2015 Aug 12
0
[PATCH 1/2] builder: add non-int revisions
...diff --git a/builder/builder.ml b/builder/builder.ml
index adfa412..260af94 100644
--- a/builder/builder.ml
+++ b/builder/builder.ml
@@ -34,6 +34,13 @@ open Printf
let () = Random.self_init ()
let remove_duplicates index =
+ let compare_revisions rev1 rev2 =
+ match rev1, rev2 with
+ | Rev_int n1, Rev_int n2 -> compare n1 n2
+ | Rev_string s1, Rev_int n2 -> compare s1 (string_of_int n2)
+ | Rev_int n1, Rev_string s2 -> compare (string_of_int n1) s2
+ | Rev_string s1, Rev_string s2 -> compare s1 s2
+ in
(* Fill an hash with the higher revision of the available...
2017 Sep 12
0
[PATCH v8 3/7] builder: add a template parameter to get_index
...corrupt_file ()
+ ) in
let signature_uri =
try Some (make_absolute_uri (List.assoc ("sig", None) fields))
with Not_found -> None in
@@ -113,7 +115,7 @@ let get_index ~downloader ~sigchecker
let revision =
try Rev_int (int_of_string (List.assoc ("revision", None) fields))
with
- | Not_found -> Rev_int 1
+ | Not_found -> if template then Rev_int 0 else Rev_int 1
| Failure _ ->
eprintf (f_"%s: cannot parse ‘revision’ field for ‘...
2017 Sep 18
0
[PATCH v9 3/7] builder: add a template parameter to get_index
...corrupt_file ()
+ ) in
let signature_uri =
try Some (make_absolute_uri (List.assoc ("sig", None) fields))
with Not_found -> None in
@@ -113,7 +115,7 @@ let get_index ~downloader ~sigchecker
let revision =
try Rev_int (int_of_string (List.assoc ("revision", None) fields))
with
- | Not_found -> Rev_int 1
+ | Not_found -> if template then Rev_int 0 else Rev_int 1
| Failure _ ->
eprintf (f_"%s: cannot parse ‘revision’ field for ‘...
2017 Oct 05
0
[PATCH v11 3/6] builder: add a template parameter to get_index
...) in
let signature_uri =
try Some (make_absolute_uri (List.assoc ("sig", None) fields))
with Not_found -> None in
@@ -112,7 +114,7 @@ let get_index ~downloader ~sigchecker { Sources.uri; proxy } =
let revision =
try Rev_int (int_of_string (List.assoc ("revision", None) fields))
with
- | Not_found -> Rev_int 1
+ | Not_found -> if template then Rev_int 0 else Rev_int 1
| Failure _ ->
eprintf (f_"%s: cannot parse ‘revision’ field for ‘...
2017 Oct 27
0
[PATCH v11 5/8] builder: add a template parameter to get_index
...) in
let signature_uri =
try Some (make_absolute_uri (List.assoc ("sig", None) fields))
with Not_found -> None in
@@ -112,21 +129,34 @@ let get_index ~downloader ~sigchecker { Sources.uri; proxy } =
let revision =
try Rev_int (int_of_string (List.assoc ("revision", None) fields))
with
- | Not_found -> Rev_int 1
+ | Not_found -> if template then Rev_int 0 else Rev_int 1
| Failure _ ->
eprintf (f_"%s: cannot parse ‘revision’ field for ‘...
2017 Nov 13
0
[PATCH v12 2/3] builder: add a template parameter to get_index
...) in
let signature_uri =
try Some (make_absolute_uri (List.assoc ("sig", None) fields))
with Not_found -> None in
@@ -112,21 +127,34 @@ let get_index ~downloader ~sigchecker { Sources.uri; proxy } =
let revision =
try Rev_int (int_of_string (List.assoc ("revision", None) fields))
with
- | Not_found -> Rev_int 1
+ | Not_found -> if template then Rev_int 0 else Rev_int 1
| Failure _ ->
eprintf (f_"%s: cannot parse ‘revision’ field for ‘...
2017 Nov 21
0
[PATCH v13 2/3] builder: add a template parameter to get_index
...) in
let signature_uri =
try Some (make_absolute_uri (List.assoc ("sig", None) fields))
with Not_found -> None in
@@ -112,21 +127,41 @@ let get_index ~downloader ~sigchecker { Sources.uri; proxy } =
let revision =
try Rev_int (int_of_string (List.assoc ("revision", None) fields))
with
- | Not_found -> Rev_int 1
+ | Not_found -> if template then Rev_int 0 else Rev_int 1
| Failure _ ->
eprintf (f_"%s: cannot parse ‘revision’ field for ‘...
2015 Aug 12
4
[PATCH 0/2 v2] RFC: builder: support for Simple Streams metadata
Hi,
this series adds a basic support for Simple Streams v1.0 metadata
files. This makes it possible to create a repository .conf files with
[cirros]
uri=http://download.cirros-cloud.net
format=simplestreams
to read the latest version of each CirrOS image.
TODO items:
- check the pasted metadata: listing and creating images works,
so most of the current metadata is correct
- possibly wait
2017 Oct 05
14
[PATCH v11 0/6] virt-builder-repository
Hi there,
This is an update of the series. Just to rebase it on top of
Rich's latest changes.
Cédric Bosdonnat (5):
builder: rename docs test script
builder: add a template parameter to get_index
builder: add Index.write_entry function
mllib: add XPath helper xpath_get_nodes()
New tool: virt-builder-repository
Pino Toscano (1):
builder: add simple OCaml osinfo-db reader
2017 Oct 09
1
Re: [PATCH v11 6/6] New tool: virt-builder-repository
...h/to/repo’ to point to the repository folder.")
OCaml lets you use multiline strings directly:
| [] ->
error (f_"Usage: virt-builder-repository /path/to/repo
Use ‘/path/to/repo’ to point to the repository folder.")
> +let increment_revision = function
> + | Utils.Rev_int n -> Utils.Rev_int (n + 1)
> + | Utils.Rev_string s -> Utils.Rev_int ((int_of_string s) + 1)
You could probably put this little utility function into builder/utils.ml.
> +let checksums_get_sha512 = function
> + | None -> Checksums.SHA512 ""
> + | Some csums ->...
2017 Sep 20
6
[PATCH v10 0/6] virt-builder-repository
Hi all,
Diff to v9 includes the changes requested by Pino.
Cédric Bosdonnat (5):
builder: rename docs test script
builder: add a template parameter to get_index
builder: add Index.write_entry function
mllib: add XPath helper xpath_get_nodes()
New tool: virt-builder-repository
Pino Toscano (1):
builder: add simple OCaml osinfo-db reader
.gitignore
2016 Dec 08
3
[PATCH 1/2] Remove most instances of OCaml warning 52.
...pers.ml | 2 +-
6 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/builder/index_parser.ml b/builder/index_parser.ml
index e5e4c6c..a3cae7d 100644
--- a/builder/index_parser.ml
+++ b/builder/index_parser.ml
@@ -113,7 +113,7 @@ let get_index ~downloader ~sigchecker
try Rev_int (int_of_string (List.assoc ("revision", None) fields))
with
| Not_found -> Rev_int 1
- | Failure "int_of_string" ->
+ | Failure _ ->
eprintf (f_"%s: cannot parse 'revision' field for '%s'...
2017 Sep 12
10
[PATCH v8 0/7] virt-builder-repository tool
Hi all,
Here is the latest iteration on the virt-builder-repository
series. Diffs to previous version are: fixing things mentioned
by Pino, integrate Pino's osinfo ocaml iterator and adding a
check of the mime type to filter potential image files.
Cédric Bosdonnat (6):
builder: rename docs test script
builder: add a template parameter to get_index
builder: add Index.write_entry
2017 Nov 21
5
[PATCH v13 0/3] virt-builder-repository
Hey there,
Here is an update of the series. The changes:
* Incorporate Richard's comments. Left out the with_openfile one
since that leads to a double close.
* Change the ask option return type to string (removing the option)
since if the use doesn't input anything we're using the default,
and the default is now a mandatory parameter.
* Make sure there are items in the
2017 Sep 18
11
[PATCH v9 0/7] virt-builder-repository
Hi there,
Diffs to v8:
* Remove the regex to increment the revision: Index_parser.get_entry()
only handles integers
* Fix Pino's comments
Cédric Bosdonnat (6):
builder: rename docs test script
builder: add a template parameter to get_index
builder: add Index.write_entry function
mllib: add XPath helper xpath_get_nodes()
builder: remove useless fish dependency
New tool:
2015 Sep 07
5
[PATCH 0/4 v3] builder: support for Simple Streams metadata
Hi,
this series adds a basic support for Simple Streams v1.0 metadata
files. This makes it possible to create a repository .conf files with
[cirros]
uri=http://download.cirros-cloud.net
format=simplestreams
to read the latest version of each CirrOS image.
Thanks,
Pino Toscano (4):
builder: add non-int revisions
builder: add simple libyajl binding
build: expose HAVE_YAJL to automake
2016 Dec 08
3
[PATCH 0/2] mllib: Add quote function to Common_utils module.
Doing this allows us to remove the Customize_utils module
completely, since it becomes empty.
Rich.
2017 Oct 27
15
[PATCH v11 0/8] virt-builder-repository
Hi all,
Here is the latest version of the series.
Diffs to v10:
* Make Index.arch a (string, string option) maybe and use it
to guess arch at parse time
* Compute the image size at parse time when the template flag
is set and the value is missing.
* Add virt-repository_main slow test
* Other fixes from Richard's comments
Cédric Bosdonnat (7):
Ignore builder/*.out and *.img
2017 Nov 13
0
[PATCH v12 3/3] New tool: virt-builder-repository
...interactive then
+ ask (s_"Expandable volume: ") ~values:(Array.to_list lvs)
+ else Some (Array.get lvs 0) in
+
+ let revision =
+ match entry with
+ | Some (_, { Index.revision = revision }) ->
+ Utils.increment_revision revision
+ | None -> Rev_int 1 in
+
+ let notes =
+ match entry with
+ | Some (_, { Index.notes = notes }) -> notes
+ | None -> [] in
+
+ let hidden =
+ match entry with
+ | Some (_, { Index.hidden = hidden }) -> hidden
+ | None -> false in
+
+ let aliases =
+ match entry...
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: