From 497023965f6a1a1acd08eb20e4deefc9340a1961 Mon Sep 17 00:00:00 2001 From: Thodoris Greasidis Date: Fri, 3 Jul 2020 18:40:12 +0300 Subject: [PATCH] config generate, os configure: Add support for mixed arch fleets Resolves: #1914 Change-type: minor Signed-off-by: Thodoris Greasidis --- lib/utils/helpers.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/utils/helpers.ts b/lib/utils/helpers.ts index d5bf58c6..bf7c0b1f 100644 --- a/lib/utils/helpers.ts +++ b/lib/utils/helpers.ts @@ -132,11 +132,13 @@ export async function getManifest( } export const areDeviceTypesCompatible = ( - deviceTypeA: BalenaSdk.DeviceType, - deviceTypeB: BalenaSdk.DeviceType, + appDeviceType: BalenaSdk.DeviceType, + osDeviceType: BalenaSdk.DeviceType, ) => - deviceTypeA.arch === deviceTypeB.arch && - !!deviceTypeA.isDependent === !!deviceTypeB.isDependent; + getBalenaSdk().models.os.isArchitectureCompatibleWith( + osDeviceType.arch, + appDeviceType.arch, + ) && !!appDeviceType.isDependent === !!osDeviceType.isDependent; export async function osProgressHandler(step: InitializeEmitter) { step.on('stdout', process.stdout.write.bind(process.stdout));