SHA256
1
0
forked from pool/supermin
supermin/suse_release.patch
Charles Arnold 4a80d0a52d - Update to version 5.3.3
* initrd: Support ztd-compressed modules
  * pacman: Recognise Artix, an Arch derivative
  * Add a separate variable to store link flags, and use that to
    supply
  * Add appropriate globs for arm based kernels. The file names end
    in -arm64 but the architecture is named aarch64.
  * Add support for OCaml 5.0
  * Add LFS support for fts functions
  * Numerous bug fixes
- Upstream bug fixes and features
  001-Improved-debugging-of-the-supermin-if-newer-calculation.patch
  002-Fix-if-newer-copy-kernel.patch
  003-Fix-kernel-filtering-for-aarch64-architecture.patch
  004-Use-output-complete-exe-instead-of-custom.patch
  005-Only-supply-output-complete-exe-to-final-link.patch
  006-Rename-function-file-kernel.patch
  007-Uncompress-kernel-on-RISC-V.patch
  008-Fix-link-to-renamed-kernel-documentation.patch
  009-New-mailing-list-email-address.patch
- Dropped initrd_support_ztd-compressed_modules.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/supermin?expand=0&rev=84
2024-01-04 20:05:17 +00:00

64 lines
1.6 KiB
Diff

--- a/src/os_release.ml
+++ b/src/os_release.ml
@@ -29,6 +29,7 @@ let split sep str =
type os_release = {
id : string;
+ id_like : string list;
}
let data = ref None
@@ -52,6 +53,7 @@ and parse () =
let lines = List.filter (fun s -> s.[0] <> '#') lines in
let id = ref "" in
+ let id_like = ref [] in
List.iter (
fun line ->
@@ -65,10 +67,11 @@ and parse () =
else value in
match field with
| "ID" -> id := value
+ | "ID_LIKE" -> id_like := string_split " " value
| _ -> ()
) lines;
- Some { id = !id; }
+ Some { id = !id; id_like = !id_like }
) else
None
@@ -76,3 +79,8 @@ let get_id () =
match get_data () with
| None -> ""
| Some d -> d.id
+
+let get_id_like () =
+ match get_data () with
+ | None -> []
+ | Some d -> d.id_like
--- a/src/os_release.mli
+++ b/src/os_release.mli
@@ -24,3 +24,10 @@ val get_id : unit -> string
An empty string is returned if the file does not exist or cannot
be read. *)
+
+val get_id_like : unit -> string list
+(** Get the value of the "ID_LIKE" field from the /etc/os-release file
+ on the current system.
+
+ An empty list is returned if the file does not exist, cannot
+ be read or the ID_LIKE field is not defined. *)
--- a/src/ph_rpm.ml
+++ b/src/ph_rpm.ml
@@ -45,6 +45,7 @@ let opensuse_detect () =
Config.zypper <> "no" &&
(List.mem (Os_release.get_id ()) [ "sled"; "sles" ] ||
string_prefix "opensuse" (Os_release.get_id ()) ||
+ List.mem "suse" (Os_release.get_id_like ()) ||
try (stat "/etc/SuSE-release").st_kind = S_REG with Unix_error _ -> false)
let mageia_detect () =