public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] meta/classes/debianize: Create debian folder if source does not contain one
@ 2021-09-29 14:43 Michael Ebel
  2021-09-29 15:53 ` Anton Mikanovich
  2021-10-04 16:19 ` Henning Schild
  0 siblings, 2 replies; 5+ messages in thread
From: Michael Ebel @ 2021-09-29 14:43 UTC (permalink / raw)
  To: isar-users


[-- Attachment #1.1: Type: text/plain, Size: 946 bytes --]

>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


[-- Attachment #1.2: Type: text/html, Size: 1228 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] meta/classes/debianize: Create debian folder if source does not contain one
  2021-09-29 14:43 [PATCH] meta/classes/debianize: Create debian folder if source does not contain one Michael Ebel
@ 2021-09-29 15:53 ` Anton Mikanovich
  2021-10-04 16:25   ` Henning Schild
  2021-10-04 16:19 ` Henning Schild
  1 sibling, 1 reply; 5+ messages in thread
From: Anton Mikanovich @ 2021-09-29 15:53 UTC (permalink / raw)
  To: Michael Ebel, isar-users

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.

-- 
Anton Mikanovich
Promwad Ltd.
External service provider of ilbers GmbH
Maria-Merian-Str. 8
85521 Ottobrunn, Germany
+49 (89) 122 67 24-0
Commercial register Munich, HRB 214197
General Manager: Baurzhan Ismagulov


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] meta/classes/debianize: Create debian folder if source does not contain one
  2021-09-29 14:43 [PATCH] meta/classes/debianize: Create debian folder if source does not contain one Michael Ebel
  2021-09-29 15:53 ` Anton Mikanovich
@ 2021-10-04 16:19 ` Henning Schild
  2021-10-05  6:02   ` Michael Ebel
  1 sibling, 1 reply; 5+ messages in thread
From: Henning Schild @ 2021-10-04 16:19 UTC (permalink / raw)
  To: Michael Ebel; +Cc: isar-users

Am Wed, 29 Sep 2021 07:43:41 -0700 (PDT)
schrieb Michael Ebel <mebel@christ-es.de>:

> 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

These double headers look a little weird. Let us use if they cause fun
for "git am". Might be a product of not using "git-send-email".

> 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

The code is too obvious to ask for an explanation.

> +    if [ ! -d ${S}/debian ]; then

Can be done without condition, install will not complain when already
there

> +        install -v -m 755 -d ${S}/debian

no need to -v

Henning

> +    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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] meta/classes/debianize: Create debian folder if source does not contain one
  2021-09-29 15:53 ` Anton Mikanovich
@ 2021-10-04 16:25   ` Henning Schild
  0 siblings, 0 replies; 5+ messages in thread
From: Henning Schild @ 2021-10-04 16:25 UTC (permalink / raw)
  To: Anton Mikanovich; +Cc: Michael Ebel, isar-users

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] meta/classes/debianize: Create debian folder if source does not contain one
  2021-10-04 16:19 ` Henning Schild
@ 2021-10-05  6:02   ` Michael Ebel
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Ebel @ 2021-10-05  6:02 UTC (permalink / raw)
  To: isar-users


[-- Attachment #1.1: Type: text/plain, Size: 1806 bytes --]

> These double headers look a little weird. Let us use if they cause fun
> for "git am". Might be a product of not using "git-send-email".

I used plain "git format-patch". I also checked that the patch does apply 
properly with "git am".
But anyway based on your feedback I will gladly submit a v2 with 
"git-send-email".

Michael
Henning Schild schrieb am Montag, 4. Oktober 2021 um 18:19:35 UTC+2:

> Am Wed, 29 Sep 2021 07:43:41 -0700 (PDT)
> schrieb Michael Ebel <me...@christ-es.de>:
>
> > From e4f8153bd3b3886b283ea19517b56f5190ca6b9a Mon Sep 17 00:00:00 2001
> > From: Michael Ebel <me...@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
>
> These double headers look a little weird. Let us use if they cause fun
> for "git am". Might be a product of not using "git-send-email".
>
> > Signed-off-by: Michael Ebel <me...@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
>
> The code is too obvious to ask for an explanation.
>
> > + if [ ! -d ${S}/debian ]; then
>
> Can be done without condition, install will not complain when already
> there
>
> > + install -v -m 755 -d ${S}/debian
>
> no need to -v
>
> Henning
>
> > + 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
>
>

[-- Attachment #1.2: Type: text/html, Size: 2423 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-10-05  6:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-29 14:43 [PATCH] meta/classes/debianize: Create debian folder if source does not contain one Michael Ebel
2021-09-29 15:53 ` Anton Mikanovich
2021-10-04 16:25   ` Henning Schild
2021-10-04 16:19 ` Henning Schild
2021-10-05  6:02   ` Michael Ebel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox