42 lines
1.5 KiB
Diff
42 lines
1.5 KiB
Diff
From decd4660a9df603dc2fedc72bdc9c9b99bc567d1 Mon Sep 17 00:00:00 2001
|
|
From: Yurii Huang <yurii.huang@dbappsecurity.com.cn>
|
|
Date: Fri, 18 Oct 2024 17:11:26 +0800
|
|
Subject: [PATCH] fix cannot detect package manager on kylin and uos
|
|
|
|
---
|
|
src/ph_rpm.ml | 8 +++++---
|
|
1 file changed, 5 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/src/ph_rpm.ml b/src/ph_rpm.ml
|
|
index 61537ce..61d2cb7 100644
|
|
--- a/src/ph_rpm.ml
|
|
+++ b/src/ph_rpm.ml
|
|
@@ -31,11 +31,13 @@ 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" ] ||
|
|
+ (List.mem (Os_release.get_id ()) [ "fedora"; "rhel"; "centos"; "openEuler"; "uos"; "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/openEuler-release").st_kind = S_REG ||
|
|
+ (stat "/etc/UnionTech-release").st_kind = S_REG ||
|
|
+ (stat "/etc/kylin-release").st_kind = S_REG
|
|
with Unix_error _ -> false)
|
|
|
|
let opensuse_detect () =
|
|
@@ -439,7 +441,7 @@ and pkgs_as_NA_rpms pkgs =
|
|
|
|
and rpm_unpack tdir dir =
|
|
(* Unpack each downloaded package.
|
|
- *
|
|
+ *
|
|
* yumdownloader can't necessarily download the specific file that we
|
|
* requested, we might get a different (eg later) version.
|
|
*)
|
|
--
|
|
2.27.0
|
|
|