git.delta.rocks / jrsonnet / refs/commits / 4ad5065059c4

difftreelog

refactor remove useless logging

Yaroslav Bolyukin2021-09-18parent: #5bccd7d.patch.diff
in: trunk

1 file changed

modifiedsrc/cmds/build_systems.rsdiffbeforeafterboth
48impl BuildSystems {48impl BuildSystems {
49 pub fn run(self, config: &Config) -> Result<()> {49 pub fn run(self, config: &Config) -> Result<()> {
50 println!("Build");50 println!("Build");
51 // let db = Db::new(".fleet")?;
52 let hosts = config.list_hosts()?;51 let hosts = config.list_hosts()?;
53 dbg!(&hosts);
54 // let data = SecretDb::open(&db)?.generate_nix_data()?;
5552
56 for host in hosts.iter() {53 for host in hosts.iter() {
57 if config.should_skip(host) {54 if config.should_skip(host) {
77 "{}.{}.config.system.build.toplevel",74 "{}.{}.config.system.build.toplevel",
78 SYSTEMS_ATTRIBUTE, host,75 SYSTEMS_ATTRIBUTE, host,
79 ));76 ));
80 // .env("SECRET_DATA", data.clone());
8177
82 if let Some(builders) = &self.builders {78 if let Some(builders) = &self.builders {
83 println!("Using builders: {}", builders);79 println!("Using builders: {}", builders);
106 if let Some(subcommand) = &self.subcommand {102 if let Some(subcommand) = &self.subcommand {
107 if subcommand.should_switch_profile() {103 if subcommand.should_switch_profile() {
108 info!("Switching generation");104 info!("Switching generation");
109 dbg!(&mut config105 config
110 .command_on(host, "nix-env", true)106 .command_on(host, "nix-env", true)
111 .args(&["-p", "/nix/var/nix/profiles/system", "--set"])107 .args(&["-p", "/nix/var/nix/profiles/system", "--set"])
112 .arg(&built)108 .arg(&built)
113 .inherit_stdio())109 .inherit_stdio()
114 .run()?;110 .run()?;
115 }111 }
116 info!("Executing activation script");112 info!("Executing activation script");
117 let mut switch_script = built.clone();113 let mut switch_script = built.clone();
118 switch_script.push("bin");114 switch_script.push("bin");
119 switch_script.push("switch-to-configuration");115 switch_script.push("switch-to-configuration");
120 info!("{:?}", switch_script);
121 config116 config
122 .command_on(host, switch_script, true)117 .command_on(host, switch_script, true)
123 .arg(subcommand.name())118 .arg(subcommand.name())