From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7057120640904462336 X-Received: by 2002:a05:6000:15c6:: with SMTP id y6mr22606526wry.121.1643734387414; Tue, 01 Feb 2022 08:53:07 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6000:3c8:: with SMTP id b8ls188748wrg.0.gmail; Tue, 01 Feb 2022 08:53:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJwnKMbg+tahRLHAbVfKTb8y4wvQX7H1on3coSlZwQqdSeUpZpxty5++Wsx2wwdz5bmPMBgV X-Received: by 2002:a05:6000:1e0a:: with SMTP id bj10mr22084908wrb.313.1643734386433; Tue, 01 Feb 2022 08:53:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643734386; cv=none; d=google.com; s=arc-20160816; b=aFpnzVr5UegIghhLpA++ftpqu1lYWcDzBAzUkdDfpEKbhU48vMiwJlRo39CTOaddMT hwCJfjs40wrv0eddL0vstqWPj0sg2gEC1Z5m2z285aZUziBln0F6AyCq4J+cPf2BSGDj FlZirE4zg4FuQ3SumdJk5NkrxZ4DvvpjPBINxe9tk+rJxRpeU9gRQlVpoIXYoHBNqlD+ y2xyqS8MULSe+sAyduLVhQXhBaGzkGHIIs9qbUJkXQ0vrMFXMWYL9t7GOKWWolG6kXGU 3yJ918EEra8FLFP4CUcsMlhP8njMxUtDtp2T0XUk9857W58PyjOA3ivUd0wGEdwHX1xm suIg== 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:to:from; bh=qdtRspPl9l0yySfLOVYZ7CCapeK72Qdz28IMHWwoxtY=; b=yZ96CNT24aKNP5+oEwv/bsBRj+p4IPLYzgJrEi+OAFgzkTC2IJQXTT4YwO3xd0dP3r h3lRDVUYA/FwH7kQ+DI1fsTkhmV+8UhdQ5MX9DsVVhGMkrfUz8IlfALBXvBjb0QJ/aEj +/Xp4z3MQtxFxdjQ5b7l+FIpoIuaNdpohA3CReDd2MHsbT58NaE69ICkrNx5aKvD1spX 6+76F8Pp3YMeovWTH6ptjyoNUkHtTlu/Y+zzHBMekkeXhMGEOAuZXu4oJmq929AHIdrD +4Bt8nJGAPXBaPqNweb0LBfqr7mmfGlGu5iAEAw+cuncHw05f0A2BIU2lkgtIqi6p+dH FLLQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id d14si1448141wrz.4.2022.02.01.08.53.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 01 Feb 2022 08:53:06 -0800 (PST) Received-SPF: pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Received: from baighyz.m.ilbers.de (host-80-81-17-52.static.customer.m-online.net [80.81.17.52]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8) with ESMTPSA id 211Gr4qg019494 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 1 Feb 2022 17:53:05 +0100 From: Uladzimir Bely To: isar-users@googlegroups.com Subject: [PATCH v3 1/8] template: Copy template attributes on transform Date: Tue, 1 Feb 2022 17:52:57 +0100 Message-Id: <20220201165304.21976-2-ubely@ilbers.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220201165304.21976-1-ubely@ilbers.de> References: <20220201165304.21976-1-ubely@ilbers.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-TUID: Eym7ml2pXP3s 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: Uladzimir Bely --- meta/classes/template.bbclass | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meta/classes/template.bbclass b/meta/classes/template.bbclass index fb9d1186..e6bcc362 100644 --- a/meta/classes/template.bbclass +++ b/meta/classes/template.bbclass @@ -8,7 +8,7 @@ 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 +56,7 @@ python do_transform_template() { stdout=output, env=env)) if process.wait() != 0: bb.fatal("processing of template failed") + + shutil.copymode(template_file, output_file) } addtask do_transform_template after do_unpack -- 2.20.1