public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Henning Schild <henning.schild@siemens.com>
To: Anton Mikanovich <amikan@ilbers.de>
Cc: Michael Ebel <mebel@christ-es.de>,
	isar-users <isar-users@googlegroups.com>
Subject: Re: [PATCH] meta/classes/debianize: Create debian folder if source does not contain one
Date: Mon, 4 Oct 2021 18:25:27 +0200	[thread overview]
Message-ID: <20211004182527.7d092f0f@md1za8fc.ad001.siemens.net> (raw)
In-Reply-To: <44068288-664e-ab9d-aaa0-bcd8b529897c@ilbers.de>

Am Wed, 29 Sep 2021 18:53:52 +0300
schrieb Anton Mikanovich <amikan@ilbers.de>:

> On 29.09.21 17:43, Michael Ebel wrote:
> > From e4f8153bd3b3886b283ea19517b56f5190ca6b9a Mon Sep 17 00:00:00
> > 2001 From: Michael Ebel <mebel@christ-es.de>
> > Date: Wed, 29 Sep 2021 16:29:40 +0200
> > Subject: [PATCH] meta/classes/debianize: Create debian folder if 
> > source does
> >  not contain one
> >
> > Signed-off-by: Michael Ebel <mebel@christ-es.de>
> > ---
> >  meta/classes/debianize.bbclass | 5 +++++
> >  1 file changed, 5 insertions(+)
> >
> > diff --git a/meta/classes/debianize.bbclass 
> > b/meta/classes/debianize.bbclass
> > index 4486778..338b1f5 100644
> > --- a/meta/classes/debianize.bbclass
> > +++ b/meta/classes/debianize.bbclass
> > @@ -88,6 +88,11 @@ EOF
> >  }
> >
> >  deb_debianize() {
> > +    # create the debian folder if the source does not contain it
> > +    if [ ! -d ${S}/debian ]; then
> > +        install -v -m 755 -d ${S}/debian
> > +    fi
> > +
> >      # create the compat-file if there is no file with that name in 
> > WORKDIR
> >      if [ -f ${WORKDIR}/compat ]; then
> >          install -v -m 644 ${WORKDIR}/compat ${S}/debian/compat
> > -- 
> > 2.25.1  
> 
> Using flag `task_function[cleandirs] += "${S}/debian"` looks much
> cleaner. You can look at
> meta-isar/recipes-app/samefile/samefile_2.14.bb for the reference.

In general using cleandirs is probably the nicer solution, but that is
on recipe level and depends on whether one really wants it to be
cleaned. You can also imagine "SRC_URI = file:///debian" where a
pre-filled folder is fetched and that task should not clean.

So the patch is valid, there is code placing files in a potentially
non-existing directory, which should be created on demand.

Henning



  reply	other threads:[~2021-10-04 16:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-29 14:43 Michael Ebel
2021-09-29 15:53 ` Anton Mikanovich
2021-10-04 16:25   ` Henning Schild [this message]
2021-10-04 16:19 ` Henning Schild
2021-10-05  6:02   ` Michael Ebel

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=20211004182527.7d092f0f@md1za8fc.ad001.siemens.net \
    --to=henning.schild@siemens.com \
    --cc=amikan@ilbers.de \
    --cc=isar-users@googlegroups.com \
    --cc=mebel@christ-es.de \
    /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