From a31d1fc52b48e045b7d94df327b129e88fb3c12b Mon Sep 17 00:00:00 2001 From: Vladislav Nepogodin Date: Sun, 21 Jul 2024 18:21:39 +0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20utils:=20skip=20ISA=20repos=20on?= =?UTF-8?q?=20Oracle=20VM?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/utils.cpp b/src/utils.cpp index e256d05..93ea7dc 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -1610,6 +1610,8 @@ void install_cachyos_repo() noexcept { const auto& isa_levels = gucc::cpu::get_isa_levels(); + const auto& is_oracle_vm = gucc::utils::exec_checked("systemd-detect-virt | grep -q oracle"); + static constexpr auto CACHYOS_V1_REPO_STR = R"( [cachyos] Include = /etc/pacman.d/cachyos-mirrorlist @@ -1628,6 +1630,10 @@ Include = /etc/pacman.d/cachyos-v4-mirrorlist )"; add_arch_specific_repo("x86_64", "cachyos", isa_levels, CACHYOS_V1_REPO_STR); + if (is_oracle_vm) { + spdlog::info("Oracle VM detected. skipping ISA specific repos"); + return; + } add_arch_specific_repo("x86_64_v3", "cachyos-v3", isa_levels, CACHYOS_V3_REPO_STR); add_arch_specific_repo("x86_64_v4", "cachyos-v4", isa_levels, CACHYOS_V4_REPO_STR); }