From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7030814154926587904 X-Received: by 2002:a63:b957:: with SMTP id v23mr24708031pgo.74.1636991869591; Mon, 15 Nov 2021 07:57:49 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a63:5106:: with SMTP id f6ls1983255pgb.11.gmail; Mon, 15 Nov 2021 07:57:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJxdA4yxinSEQWlz9TNZQC0nqNl1BXzZBHX/IMYWv1gaeVxhXPuDkjdKTJ+C2yjRET+mox69 X-Received: by 2002:a63:be4b:: with SMTP id g11mr25346938pgo.46.1636991868924; Mon, 15 Nov 2021 07:57:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636991868; cv=none; d=google.com; s=arc-20160816; b=zag8G/l//A8OU4PL9b2CfopqKhZbaioyf9zlxR06Iy3/bDYgLqyL3WnR6pq7QpHoXY Lcz4yB66dnFNXi5nej/yjHEnA++CGGI7yQJtKWElqQ2NClmob24IXm9bK6mCxEo9CKFh eNM0MD7f9mJFfoIrOCB6r8DMJXOeV7K0eFphQdQDLn85CUpNnQaT0hlAqtPBHVfmLX9R P+6wM2lVkVqtLAoB6lBWFmPabDJgMozAWCZtmaTPM1JTq6lSqvV9EyfOuOzTIFUCLqJT r1wiFxoa4W485rmLbSZa2JcafMTkvtqEbr8nFqnfNXA0OnwUMNkQWyHi12NobdW7hzib w4fg== 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:subject:cc:to:from:date; bh=F9Il1Q+jfVTBDx/GmYoBEzwfP+/i4wOcnCligfGGTrk=; b=R3DATHbpgZTr+jXq3lD1O+pr42lEXEzGHtPoCJSgo6BRX3OdF5qecO1NGU4LmtNB88 6j8zOgtVFudlOKGAebe5dMKwrS8Z9Ro3vkP4kN3HJ3O2tSlZNHqdprmz41BwR4S7Z9wG hlwdtXcNSOFl+4Isn+p5BChoarPd34nCTdHtQe0KSLbQpwTahsFawMxHvQOhfNipjUIw z5xLC3ej/fAMkTHgFDoeDs0r4ORzDWZqU4VKfP+xlYmeT7ykcG3rQEThMw9qdBDLXdCc PRpygS09ho/GuzuieYgpczLWik2lnkdXj3XSE3HuK85bL1eSnqM18ASdkpxAAX/uQJvg 4z6g== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 194.138.37.39 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from lizzard.sbs.de (lizzard.sbs.de. [194.138.37.39]) by gmr-mx.google.com with ESMTPS id w4si1260005pjr.3.2021.11.15.07.57.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Nov 2021 07:57:48 -0800 (PST) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 194.138.37.39 as permitted sender) client-ip=194.138.37.39; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 194.138.37.39 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by lizzard.sbs.de (8.15.2/8.15.2) with ESMTPS id 1AFFvkUV027026 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 15 Nov 2021 16:57:46 +0100 Received: from md1za8fc.ad001.siemens.net ([139.22.32.21]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id 1AFFvkN2019037; Mon, 15 Nov 2021 16:57:46 +0100 Date: Mon, 15 Nov 2021 16:57:45 +0100 From: Henning Schild To: Anton Mikanovich Cc: isar-users@googlegroups.com Subject: Re: [PATCH] template: Make templates passthrough Message-ID: <20211115165745.422c09d9@md1za8fc.ad001.siemens.net> In-Reply-To: <20211115150935.153613-1-amikan@ilbers.de> References: <20211115150935.153613-1-amikan@ilbers.de> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TUID: aSAoC9+mGUs5 Does that removal have any side-effects on ... say the fetch task? If not .. i guess toggeling that KEEP from 0 to 1 would result in "no such file" Am Mon, 15 Nov 2021 18:09:35 +0300 schrieb Anton Mikanovich : > There is no need to store original template files after the conversion > in real scenarios. To make working folder little cleaner we can remove > them. This can be disabled with TEMPLATE_FILES_KEEP variable. i do not buy the argument and would keep it the way it is ... reject that patch, but maybe i do not yet get the full picture. Not the whole patch ... the bits in the custom linux could be valid ... always keep as with all other templates, unless it makes debian unhappy. > Moreover output file should have exactly the same flags as input one, > which is usefull for the cases like debian/rules or other executables. > So we should copy this part of metadata after the conversion. > > Signed-off-by: Anton Mikanovich > --- > meta/classes/template.bbclass | 7 ++++++- > meta/recipes-kernel/linux/linux-custom.inc | 3 --- > 2 files changed, 6 insertions(+), 4 deletions(-) > > diff --git a/meta/classes/template.bbclass > b/meta/classes/template.bbclass index fb9d1186..f5760e15 100644 > --- a/meta/classes/template.bbclass > +++ b/meta/classes/template.bbclass > @@ -4,11 +4,12 @@ > # SPDX-License-Identifier: MIT > > TEMPLATE_FILES ?= "" > +TEMPLATE_FILES_KEEP ?= "0" Why offer a way at all? And if we do not default to 1, do we need a changelog entry? All in all i think we can keep the files ... always. It is not like they add a lot of overhead or confusion. And nobody would delete c files in a Makefile after the .o s are created ... regards, Henning > TEMPLATE_VARS ?= "PN PV DESCRIPTION HOMEPAGE MAINTAINER DISTRO_ARCH" > > do_transform_template[vardeps] = "TEMPLATE_FILES ${TEMPLATE_VARS}" > python do_transform_template() { > - import subprocess, contextlib > + import subprocess, contextlib, shutil > > workdir = os.path.normpath(d.getVar('WORKDIR', True)) > > @@ -56,5 +57,9 @@ python do_transform_template() { > stdout=output, env=env)) > if process.wait() != 0: > bb.fatal("processing of template failed") > + > + shutil.copymode(template_file, output_file) > + if d.getVar('TEMPLATE_FILES_KEEP', True) != '1': > + os.remove(template_file) > } > addtask do_transform_template after do_unpack > diff --git a/meta/recipes-kernel/linux/linux-custom.inc > b/meta/recipes-kernel/linux/linux-custom.inc index ed89aa09..57740860 > 100644 --- a/meta/recipes-kernel/linux/linux-custom.inc > +++ b/meta/recipes-kernel/linux/linux-custom.inc > @@ -122,9 +122,6 @@ do_prepare_build_prepend() { > rm -rf ${S}/debian > cp -r ${WORKDIR}/debian ${S}/ > > - # remove templates from the source tree > - find ${S}/debian -name *.tmpl | xargs rm -f > - > # rename install/remove hooks to match user-specified name > for our linux-image package mv ${S}/debian/linux-image.postinst > ${S}/debian/linux-image-${KERNEL_NAME_PROVIDED}.postinst mv > ${S}/debian/linux-image.postrm > ${S}/debian/linux-image-${KERNEL_NAME_PROVIDED}.postrm