Skip to content

Commit a31d1fc

Browse files
committed
🚧 utils: skip ISA repos on Oracle VM
1 parent 342b122 commit a31d1fc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

‎src/utils.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1610,6 +1610,8 @@ void install_cachyos_repo() noexcept {
16101610

16111611
const auto& isa_levels = gucc::cpu::get_isa_levels();
16121612

1613+
const auto& is_oracle_vm = gucc::utils::exec_checked("systemd-detect-virt | grep -q oracle");
1614+
16131615
static constexpr auto CACHYOS_V1_REPO_STR = R"(
16141616
[cachyos]
16151617
Include = /etc/pacman.d/cachyos-mirrorlist
@@ -1628,6 +1630,10 @@ Include = /etc/pacman.d/cachyos-v4-mirrorlist
16281630
)";
16291631

16301632
add_arch_specific_repo("x86_64", "cachyos", isa_levels, CACHYOS_V1_REPO_STR);
1633+
if (is_oracle_vm) {
1634+
spdlog::info("Oracle VM detected. skipping ISA specific repos");
1635+
return;
1636+
}
16311637
add_arch_specific_repo("x86_64_v3", "cachyos-v3", isa_levels, CACHYOS_V3_REPO_STR);
16321638
add_arch_specific_repo("x86_64_v4", "cachyos-v4", isa_levels, CACHYOS_V4_REPO_STR);
16331639
}

0 commit comments

Comments
 (0)