Skip to content

Commit

Permalink
🚧 utils: skip ISA repos on Oracle VM
Browse files Browse the repository at this point in the history
  • Loading branch information
vnepogodin committed Jul 21, 2024
1 parent 342b122 commit a31d1fc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
}
Expand Down

0 comments on commit a31d1fc

Please sign in to comment.