Displaying 6 results from an estimated 6 matches for "index_of_architectur".
Did you mean:
index_of_architecture
2019 Apr 12
0
[supermin PATCH 5/5] utils: remove unused 'compare_architecture' function
...tils.mli | 3 ---
2 files changed, 30 deletions(-)
diff --git a/src/utils.ml b/src/utils.ml
index f85418f..b25df88 100644
--- a/src/utils.ml
+++ b/src/utils.ml
@@ -172,33 +172,6 @@ and split_version = function
) in
first :: split_version rest
-let compare_architecture a1 a2 =
- let index_of_architecture = function
- | "noarch" | "all" -> 100
- | "i386" | "i486" | "i586" | "i686" | "x86_32" | "x86-32" -> 32
- | "x86_64" | "x86-64" | "amd64" -> 64
- | "armel"...
2019 Apr 12
6
[supermin PATCH 0/5] rpm: fix package selection w/ multilib
This patch series fixes the way supermin sorts the list of installed
packages when resolving a name, picking the right package for the host
architecture.
Pino Toscano (5):
rpm: do not unpack parameters
rpm: fix version comparison
rpm: query the RPM architecture
rpm: fix package sorting (RHBZ#1696822)
utils: remove unused 'compare_architecture' function
src/librpm-c.c | 10
2015 Jul 13
2
[PATCH 1/2] utils: import parse_size from libguestfs
...--
src/utils.ml | 21 +++++++++++++++++++++
src/utils.mli | 3 +++
2 files changed, 24 insertions(+)
diff --git a/src/utils.ml b/src/utils.ml
index 3e81c21..7ae24bd 100644
--- a/src/utils.ml
+++ b/src/utils.ml
@@ -204,3 +204,24 @@ let compare_architecture a1 a2 =
exit 1
in
compare (index_of_architecture a1) (index_of_architecture a2)
+
+(* Parse a size field, eg. "10G". *)
+let parse_size =
+ let const_re = Str.regexp "^\\([.0-9]+\\)\\([bKMG]\\)$" in
+ fun field ->
+ let matches rex = Str.string_match rex field 0 in
+ let sub i = Str.matched_group i field in
+ le...
2016 Feb 18
0
[PATCH 3/3] Add and use an helper error function
...gt; 64
| a ->
- eprintf "supermin: missing support for architecture '%s'\nIt may need to be added to supermin.\n" a;
- exit 1
+ error "missing support for architecture '%s'\nIt may need to be added to supermin."
+ a
in
compare (index_of_architecture a1) (index_of_architecture a2)
@@ -213,6 +214,5 @@ let parse_size =
if matches const_re then (
size_scaled (float_of_string (sub 1)) (sub 2)
) else (
- eprintf "supermin: cannot parse size field '%s'\n" field;
- exit 1
+ error "cannot parse...
2016 Feb 18
4
[PATCH 0/3] supermin: miscellaneous cleanups
Hi,
few cleanups in the supermin codebase; no actual functional change.
Thanks,
--
Pino Toscano (3):
ext2: simplify tracking of visited modules
utils: remove unused run_python function
Add and use an helper error function
src/build.ml | 20 +++++-----------
src/dpkg.ml | 4 +---
src/ext2_initrd.ml | 10 ++++----
src/kernel.ml | 27
2014 Feb 25
2
[PATCH supermin v4] Supermin 5 rewrite.
...Str.string_match rex_letters str 0 then
+ `String (Str.matched_group 1 str), Str.matched_group 2 str
+ else (
+ let len = String.length str in
+ `Char str.[0], String.sub str 1 (len-1)
+ ) in
+ first :: split_version rest
+
+let compare_architecture a1 a2 =
+ let index_of_architecture = function
+ | "noarch" -> 100
+ | "i386" | "i486" | "i586" | "i686" | "x86_32" | "x86-32" -> 32
+ | "x86_64" | "x86-64" | "amd64" -> 64
+ | "armel" | "armhf"...