MCPcopy Create free account
hub / github.com/CodSpeedHQ/codspeed / install

Function install

src/executor/helpers/apt.rs:98–114  ·  view source on GitHub ↗
(system_info: &SystemInfo, packages: &[&str])

Source from the content-addressed store, hash-verified

96}
97
98pub fn install(system_info: &SystemInfo, packages: &[&str]) -> Result<()> {
99 if !is_system_compatible(system_info) {
100 bail!(
101 "Package installation is not supported on this system, please install necessary packages manually"
102 );
103 }
104
105 info!("Installing packages: {}", packages.join(", "));
106
107 run_with_sudo("apt-get", ["update"])?;
108 let mut install_argv = vec!["install", "-y", "--allow-downgrades"];
109 install_argv.extend_from_slice(packages);
110 run_with_sudo("apt-get", &install_argv)?;
111
112 debug!("Packages installed successfully");
113 Ok(())
114}
115
116/// Restore cached tools from the cache directory to the root filesystem
117fn restore_from_cache(system_info: &SystemInfo, cache_dir: &Path) -> Result<()> {

Callers 3

install_perfFunction · 0.50
setupMethod · 0.50
install_valgrindFunction · 0.50

Calls 2

is_system_compatibleFunction · 0.85
run_with_sudoFunction · 0.85

Tested by

no test coverage detected