From patchwork Tue Sep 7 13:22:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 1525367 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20210112 header.b=PDKNAsKL; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=jURfZb/T; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::23e; helo=mail-lj1-x23e.google.com; envelope-from=swupdate+bncbcx6venntaprblwp3weqmgqed32zyai@googlegroups.com; receiver=) Received: from mail-lj1-x23e.google.com (mail-lj1-x23e.google.com [IPv6:2a00:1450:4864:20::23e]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4H3mD360hFz9t0Z for ; Tue, 7 Sep 2021 23:22:58 +1000 (AEST) Received: by mail-lj1-x23e.google.com with SMTP id d19-20020a2e8913000000b001c2cf57d9b7sf4809046lji.16 for ; Tue, 07 Sep 2021 06:22:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1631020975; cv=pass; d=google.com; s=arc-20160816; b=AjkD7D/TqEZqbrsDrApP7oTLUgstjkZyldAojMw3vlWXNbjPlHjGbQbd4d6e2u2bHV IKlCUpN5Tz7NfVi/6WujzVSqu5t3OMNdFZYWWXCxnoTTHAU/X80BWYlBiyLXrDCF4sri Y+kqOjQk3QtH0KohywwL9Waa2I4BPXnarsvWr+Sm1lUI+ID67qienVRG9UaIYmRzUKE+ 9OjFHDIMzuWbi4JKU/xZgMPEc98p6N2qffV+2BJOU0o3RVtew08KRn5ZpOriniJnV43j kFkT6na2VmIGLGI3xywjkPOIliEok5TlAVQb5Q887ZMeqT/ASHRH1RnX1V98Lja7xJWF 56CQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature :dkim-signature; bh=Y2EohChrcRZGknWQ3/Ezen5Rcrsa9bSFavUIZE3w6+M=; b=ymVluyDC5L09AMMBnO7sc66wY3YeQTOk9V3kMU0EXEANO9y1+xRTvt2MSieC6hO/lB OZ5IWQbtnoFG9m1lUw3ywLoIPp5+ma44g7GxRXeICrvr3CDxtiwlM33X8+Ic+Lv0Xh6I 7GfMwExNebBTWAC53CPHXW2OxZl1kOvATD4g32yoUq3i4FGQ9CFP/QObSyUAdfx76PuX 0JIiTOxLuqKIaB0a23UDkgz5LqsNDmL2i4kxlNlO/g8DPAmRPUrxdoerFutNmTAwcx82 lgRKwc0cwUaIw5/JD05g65zTGqfA7ndFGdnBFtqZJnDVB3pWfXkQaXPXzOv5hwkZKLbi 1GMA== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=MInVny0r; spf=pass (google.com: domain of adrian.freihofer@gmail.com designates 2a00:1450:4864:20::531 as permitted sender) smtp.mailfrom=adrian.freihofer@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=Y2EohChrcRZGknWQ3/Ezen5Rcrsa9bSFavUIZE3w6+M=; b=PDKNAsKLfpc+F9WlirlAmJhxiROtxIXvvSslFPOQCtqr6ccJ+5m51MVgZFcAthpiHK 11p6hJmv0GNi/JSHS20dhc2FyiXnv3NvgSIKnWj2dohR0i8pMbHUT2BP2Fki8Lv6K8S9 FVFGycr8C5Jl4W73+HaE+ncGBLicBZIjbhLvoKbeQBj9ViuFMqCcZCqV4DWSTTjYLafW O0AZloRXFcAce03WeWIION18NZR/loUOLNmWZxgpu59qkYGwR2NPZUJP+HkVeGBKwSjd qqCo2J1iid9RjQqY4wQSy2ANQUM2MRUhMPCV0IFZViDX7SPgI+gyItGqI1t0JJy3i1cG Ix4w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=Y2EohChrcRZGknWQ3/Ezen5Rcrsa9bSFavUIZE3w6+M=; b=jURfZb/TQy1CsambEQT9urHjSvKKjtDeeJjJUm9eLs3dL7WiRVS7McxrpOZIJLUQVG tAvwExVENhylzOEhydBjbOYG4pAaNu8vLHpC2aNMYjdsHarpFhbQ7jPuVkIBPRJ1UwLO xNwT8z/gCSU0qdPpbyGe4xd2vhi8QVh0cE8G9S3tMVX5AfEeW5lDztHf7mnas4DFHUZQ 9yCHERB5gnRi1zJzufzo8GxfVBUD5zEs3SH9tdPeVXBRZA01QPAMH27gYuydxRjt5ocY p0pwE3TldsKx+J00aH2Cy6A22cJJaJNVAc1dqxCgsF1vOxp7uwpbvNVC6SlWf1rTRHLZ BBkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=Y2EohChrcRZGknWQ3/Ezen5Rcrsa9bSFavUIZE3w6+M=; b=i9tWZpd63ritx1DyoPij5MCZIw1xl+2wq0kWJHMvhagg3fAqot9nezC+cru9bStuE+ pfNRNHvwdKhBqogY0mdiX++OxFR2J5rit3I7TGtzpaICBo/qrqDD/7s9pRB0Fa0I8irO kmIPPM1vSboMsm3NTbV5FyWFKT9s3mB6B3dFEwouPjRklK0odecV2lHjCoTzOLTDsRHG eDtBYb1ChP1Axjn0HFZ/M2pv7rDOtMlC1TyTzL903FU3+2QVNG/61T0adVdrU8ayZBA+ JYQZZ1kL0txDxf8nMXfoo0jgmXny+JHbn/oSjb6nymkh+T6jzf7KIYDmgqRQr3J96CNb q2eQ== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM531/YyWsC8QF8nCbpIjdkmTjqJwKk+6O7fjn9KZSag/onXtLT+f9 R5uPKGsUIrgyZhGYfYEtP3I= X-Google-Smtp-Source: ABdhPJyTz4ieShBefFC8IHmPgYOVjj/iGvg5aZbzQOKSTbFb9IMbSffJ5D3/xyWzDoO4PtjHFi4Mbg== X-Received: by 2002:a05:651c:210d:: with SMTP id a13mr14376956ljq.247.1631020974583; Tue, 07 Sep 2021 06:22:54 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a05:6512:3ba:: with SMTP id v26ls130540lfp.3.gmail; Tue, 07 Sep 2021 06:22:53 -0700 (PDT) X-Received: by 2002:a05:6512:1528:: with SMTP id bq40mr2249775lfb.71.1631020973573; Tue, 07 Sep 2021 06:22:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631020973; cv=none; d=google.com; s=arc-20160816; b=HobF6tRQeJqcQrwVxsP+Afd1RNni1pxvUZM6agYFOJREf6hhjIkpo9qbXITVcqqYzS bMUm44UqNy2y99zuO7JE5K0XI+ipr0nwTza4a4Y8hLDrarxtgKBVOrjMtRm1jmJZi/o/ i/lFYtb0EaHFE8cmgeQ7cMGwEeAZDI+whow+qFxDeFj9Y6D1mFyHgi+RVIdQjGNZnl2F vFoEkjKUBedXAarOPAJCBY6KZCv8zKx03XVmDeNnBaqQhAoKMyjB6gbN1IC0kOoPepAq 1dH0KzFWgt/Axw8YswPQN2yznyubGS8pTZa6HU9LnAIRFDTiUsWsxLUDyns0kQLyh8KC QjKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=6ZMfOVsIcjHG1tZTdVpyELSqAuDge0zRncwyKty8CPo=; b=yziGU8WwNuwxXNsEcyGsp/KWxGOunCW4AoY/bDH6Jxg7k5GOQj82AxnnbEMqUPeRib 5k6LjmVUn9xZpP7186ujugZPGTNKyqJCYk9dizumr/A/pedS/5q39Qoek/cfjOYY2jK9 efmjSIHG7/wo7oJFgQFEa36oyuKyC48Fxna2rrOLDRxRYi557VhdmFR3L+b1bcQSY43e 5JwZ/tLsdyiTNB+voUURR/a5UxM6Fp6gwlmn/Qv5HMY5iYOYKxgmCoKW2AyiDrH7kB58 qKqa5YhfUXIK8Iww7nzJOTCTbjbqbEELvSMR2/+g3tRm3ka74M+qOUhq5RUwSmMQZRX2 vCUA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=MInVny0r; spf=pass (google.com: domain of adrian.freihofer@gmail.com designates 2a00:1450:4864:20::531 as permitted sender) smtp.mailfrom=adrian.freihofer@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com. [2a00:1450:4864:20::531]) by gmr-mx.google.com with ESMTPS id z26si233416lfu.6.2021.09.07.06.22.53 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Sep 2021 06:22:53 -0700 (PDT) Received-SPF: pass (google.com: domain of adrian.freihofer@gmail.com designates 2a00:1450:4864:20::531 as permitted sender) client-ip=2a00:1450:4864:20::531; Received: by mail-ed1-x531.google.com with SMTP id g21so13917350edw.4 for ; Tue, 07 Sep 2021 06:22:53 -0700 (PDT) X-Received: by 2002:aa7:ca0e:: with SMTP id y14mr18068360eds.249.1631020973177; Tue, 07 Sep 2021 06:22:53 -0700 (PDT) Received: from md2ramxc.ad001.siemens.net ([62.32.0.69]) by smtp.gmail.com with ESMTPSA id g9sm560184edk.54.2021.09.07.06.22.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Sep 2021 06:22:52 -0700 (PDT) From: Adrian Freihofer To: swupdate@googlegroups.com Cc: Adrian Freihofer Subject: [swupdate] [meta-swupdate][PATCH dunfell+ v2 4/6] swupdate-image: ensure the artifact is there Date: Tue, 7 Sep 2021 15:22:38 +0200 Message-Id: <20210907132240.2987302-5-adrian.freihofer@siemens.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210907132240.2987302-1-adrian.freihofer@siemens.com> References: <20210907132240.2987302-1-adrian.freihofer@siemens.com> MIME-Version: 1.0 X-Original-Sender: adrian.freihofer@gmail.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=MInVny0r; spf=pass (google.com: domain of adrian.freihofer@gmail.com designates 2a00:1450:4864:20::531 as permitted sender) smtp.mailfrom=adrian.freihofer@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , This introduces a new variable IMAGE_FSTYPE_SWU which most probably needs to be overridden by the image. The main purpose is to ensure the image artifact is available when do_swuimage runs. If the user for example would set the IMAGE_FSTYPES to ext4.gz but include the ext4 into the swu file it does not work because the ext4 image gets immediately deleted if it is not explicitely requested. It's also more convenient to set a variable instead of the dealing with the VarFlags. --- classes/swupdate-image.bbclass | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/classes/swupdate-image.bbclass b/classes/swupdate-image.bbclass index ae4beeb..2b00727 100644 --- a/classes/swupdate-image.bbclass +++ b/classes/swupdate-image.bbclass @@ -8,6 +8,22 @@ # The generated output file is an swu archive ready to be uploaded to a device running # swupdate. + +# Define the image type included in the swu file for this image +IMAGE_FSTYPE_SWU ??= "ext4" + +# Add the image type of this image explicitely otherwise the artifacts +# gets deleted before do_swuimage task runs +IMAGE_FSTYPES_append = " ${IMAGE_FSTYPE_SWU}" + + +python() { + # Define the image type which should be included into the swu file + image = d.getVar('IMAGE_LINK_NAME') + image_type = d.getVar('IMAGE_FSTYPE_SWU') + d.setVarFlag('SWUPDATE_IMAGES_FSTYPES', image, '.' + image_type) +} + inherit swupdate-common.bbclass S = "${WORKDIR}/${PN}"