From 8a2c75dfe3c245d2aeb30d0f8d513c7a17671b90 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Wed, 31 Jan 2018 16:48:30 -0500 Subject: [PATCH] Disable the supportedSystem limiter when doing evaluation checks --- ofborg/src/nix.rs | 39 +++++++++++++++++++++++++------ ofborg/src/tasks/massrebuilder.rs | 2 +- 2 files changed, 33 insertions(+), 8 deletions(-) diff --git a/ofborg/src/nix.rs b/ofborg/src/nix.rs index 249ee50..788d599 100644 --- a/ofborg/src/nix.rs +++ b/ofborg/src/nix.rs @@ -11,6 +11,7 @@ pub struct Nix { system: String, remote: String, build_timeout: u16, + limit_supported_systems: bool, } impl Nix { @@ -19,6 +20,7 @@ impl Nix { system: system, remote: remote, build_timeout: build_timeout, + limit_supported_systems: true, }; } @@ -27,6 +29,25 @@ impl Nix { system: system, remote: self.remote.clone(), build_timeout: self.build_timeout, + limit_supported_systems: self.limit_supported_systems, + }; + } + + pub fn with_limited_supported_systems(&self) -> Nix { + return Nix { + system: self.system.clone(), + remote: self.remote.clone(), + build_timeout: self.build_timeout, + limit_supported_systems: true, + }; + } + + pub fn without_limited_supported_systems(&self) -> Nix { + return Nix { + system: self.system.clone(), + remote: self.remote.clone(), + build_timeout: self.build_timeout, + limit_supported_systems: false, }; } @@ -119,13 +140,17 @@ impl Nix { ], ); command.args(&["--argstr", "system", &self.system]); - command.args( - &[ - "--arg", - "supportedSystems", - &format!("[\"{}\"]", &self.system), - ], - ); + + if self.limit_supported_systems { + command.args( + &[ + "--arg", + "supportedSystems", + &format!("[\"{}\"]", &self.system), + ], + ); + } + command.args(args); return command; diff --git a/ofborg/src/tasks/massrebuilder.rs b/ofborg/src/tasks/massrebuilder.rs index 0d0f316..9411742 100644 --- a/ofborg/src/tasks/massrebuilder.rs +++ b/ofborg/src/tasks/massrebuilder.rs @@ -39,7 +39,7 @@ impl MassRebuildWorker { ) -> MassRebuildWorker { return MassRebuildWorker { cloner: cloner, - nix: nix, + nix: nix.without_limited_supported_systems(), github: github, identity: identity, events: events,