supermin/9003-fix-cannot-detect-package-manager-on-KylinOS.patch

35 lines
1.4 KiB
Diff
Raw Permalink Normal View History

From 3186a6bc327687fa1d1a941fe631d22788aac570 Mon Sep 17 00:00:00 2001
From: yueyuankun <yueyuankun@kylinos.cn>
Date: Wed, 17 Apr 2024 15:41:17 +0800
Subject: [PATCH] fix cannot detect package manager on KylinOS
---
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 1e16bbe..c232bff 100644
--- a/src/ph_rpm.ml
+++ b/src/ph_rpm.ml
@@ -32,14 +32,15 @@ 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"; "nestos" ] ||
+ (List.mem (Os_release.get_id ()) [ "fedora"; "rhel"; "centos"; "openEuler"; "anolis"; "uos"; "nestos" ; "kylin" ] ||
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/openEuler-release-nestos-for-virt").st_kind = S_REG
+ (stat "/etc/openEuler-release-nestos-for-virt").st_kind = S_REG ||
+ (stat "/etc/kylin-release").st_kind = S_REG
with Unix_error _ -> false)
let opensuse_detect () =
--
2.33.0