34 lines
1.3 KiB
Diff
34 lines
1.3 KiB
Diff
From 79c8d4e698d4a05965eaec361e9a09eec12eee42 Mon Sep 17 00:00:00 2001
|
|
From: jianli-97 <lijian2@kylinos.cn>
|
|
Date: Mon, 16 Oct 2023 14:58:57 +0800
|
|
Subject: [PATCH] fix cannot detect package manager on NestOS
|
|
|
|
---
|
|
src/ph_rpm.ml | 5 +++--
|
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/ph_rpm.ml b/src/ph_rpm.ml
|
|
index f2d9d3e..94ec845 100644
|
|
--- a/src/ph_rpm.ml
|
|
+++ b/src/ph_rpm.ml
|
|
@@ -32,13 +32,14 @@ let stringset_of_list pkgs =
|
|
let fedora_detect () =
|
|
Config.rpm <> "no" && Config.rpm2cpio <> "no" && rpm_is_available () &&
|
|
(Config.yumdownloader <> "no" || Config.dnf <> "no") &&
|
|
- (List.mem (Os_release.get_id ()) [ "fedora"; "rhel"; "centos"; "openEuler"; "anolis"; "uos" ] ||
|
|
+ (List.mem (Os_release.get_id ()) [ "fedora"; "rhel"; "centos"; "openEuler"; "anolis"; "uos"; "nestos" ] ||
|
|
try
|
|
(stat "/etc/redhat-release").st_kind = S_REG ||
|
|
(stat "/etc/fedora-release").st_kind = S_REG ||
|
|
(stat "/etc/openEuler-release").st_kind = S_REG ||
|
|
(stat "/etc/UnionTech-release").st_kind = S_REG ||
|
|
- (stat "/etc/anolis-release").st_kind = S_REG
|
|
+ (stat "/etc/anolis-release").st_kind = S_REG ||
|
|
+ (stat "/etc/openEuler-release-nestos-for-virt").st_kind = S_REG
|
|
with Unix_error _ -> false)
|
|
|
|
let opensuse_detect () =
|
|
--
|
|
2.33.0
|
|
|