public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Uladzimir Bely <ubely@ilbers.de>
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	[thread overview]
Message-ID: <20220201165304.21976-2-ubely@ilbers.de> (raw)
In-Reply-To: <20220201165304.21976-1-ubely@ilbers.de>

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 <ubely@ilbers.de>
---
 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


  reply	other threads:[~2022-02-01 16:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-01 16:52 [PATCH v3 0/8] Avoid using shell environment during the build Uladzimir Bely
2022-02-01 16:52 ` Uladzimir Bely [this message]
2022-02-01 16:52 ` [PATCH v3 2/8] linux-module: Do not use shell environment Uladzimir Bely
2022-02-01 16:52 ` [PATCH v3 3/8] u-boot: " Uladzimir Bely
2022-02-01 16:53 ` [PATCH v3 4/8] trusted-firmware: " Uladzimir Bely
2022-02-01 16:53 ` [PATCH v3 5/8] optee-os: " Uladzimir Bely
2022-02-01 16:53 ` [PATCH v3 6/8] kselftest: " Uladzimir Bely
2022-02-01 16:53 ` [PATCH v3 7/8] linux-mainline: Move cfg fragment test to debian/rules Uladzimir Bely
2022-02-01 16:53 ` [PATCH v3 8/8] linux-custom: Move cfg fragments applying " Uladzimir Bely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220201165304.21976-2-ubely@ilbers.de \
    --to=ubely@ilbers.de \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox