Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
utils: remove unused 'compare_architecture' function
This was used only in the RPM package handler.
  • Loading branch information
ptoscano committed Apr 12, 2019
1 parent 72735dd commit b240128
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 30 deletions.
27 changes: 0 additions & 27 deletions src/utils.ml
Expand Up @@ -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" | "armhf" -> 32
| "aarch64" -> 64
| a when string_prefix "armv5" a -> 32
| a when string_prefix "armv6" a -> 32
| a when string_prefix "armv7" a -> 32
| a when string_prefix "armv8" a -> 64
| "hppa" | "parisc" -> 32
| "hppa64" | "parisc64" -> 64
| "ppc" | "ppc32" -> 32
| a when string_prefix "ppc64" a -> 64
| "sparc" | "sparc32" -> 32
| "sparc64" -> 64
| "ia64" -> 64
| "s390" -> 32
| "s390x" -> 64
| "alpha" -> 64
| a ->
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)

(* Parse a size field, eg. "10G". *)
let parse_size =
let const_re = Str.regexp "^\\([.0-9]+\\)\\([bKMG]\\)$" in
Expand Down
3 changes: 0 additions & 3 deletions src/utils.mli
Expand Up @@ -86,9 +86,6 @@ val filter_map : ('a -> 'b option) -> 'a list -> 'b list
val compare_version : string -> string -> int
(** Compare two version-like strings. *)

val compare_architecture : string -> string -> int
(** Compare two architecture strings. *)

val parse_size : string -> int64
(** Parse a size field, eg. [10G] *)

Expand Down

0 comments on commit b240128

Please sign in to comment.