supermin/0004-fix-cannot-detect-package-manager-on-anolis.patch
Richard W.M. Jones 1951f6acfa Include all upstream patches since 5.3.2
Add debugging and accurate exception backtraces (RHBZ#2124571).
2022-09-07 16:17:52 +01:00

32 lines
1.1 KiB
Diff

From b47d2f1fe29557874409295c55971c91379fa756 Mon Sep 17 00:00:00 2001
From: mahailiang <mahailiang@uniontech.com>
Date: Fri, 19 Aug 2022 15:41:24 +0800
Subject: [PATCH 04/12] fix cannot detect package manager on anolis
---
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 549bd9a..f1ea299 100644
--- a/src/ph_rpm.ml
+++ b/src/ph_rpm.ml
@@ -32,11 +32,12 @@ 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"; "anolis" ] ||
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/anolis-release").st_kind = S_REG
with Unix_error _ -> false)
let opensuse_detect () =
--
2.37.3