Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] archiver.bbclass: DISTRO is not required variable so deal with it
@ 2012-11-22  9:19 Marcin Juszkiewicz
  2012-11-22 10:06 ` Paul Eggleton
  0 siblings, 1 reply; 3+ messages in thread
From: Marcin Juszkiewicz @ 2012-11-22  9:19 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
---
 meta/classes/archiver.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index 160a3aa..ac6e401 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -8,7 +8,6 @@
 
 ARCHIVE_EXCLUDE_FROM ?= ".pc autom4te.cache"
 ARCHIVE_TYPE ?= "tar srpm"
-DISTRO ?= "poky"
 PATCHES_ARCHIVE_WITH_SERIES = 'yes'
 SOURCE_ARCHIVE_LOG_WITH_SCRIPTS ?= '${@d.getVarFlag('ARCHIVER_MODE', 'log_type') \
     if d.getVarFlag('ARCHIVER_MODE', 'log_type') != 'none' else 'logs_with_scripts'}'
@@ -492,6 +491,8 @@ def create_diff_gz(d):
 
     s=d.getVar('S', True)
     distro = d.getVar('DISTRO',True)
+    if not distro:
+        distro = ""
     dest = s + '/' + distro + '/files'
     if not os.path.exists(dest):
         bb.mkdirhier(dest)
-- 
1.8.0




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

* Re: [PATCH] archiver.bbclass: DISTRO is not required variable so deal with it
  2012-11-22  9:19 [PATCH] archiver.bbclass: DISTRO is not required variable so deal with it Marcin Juszkiewicz
@ 2012-11-22 10:06 ` Paul Eggleton
  2012-11-22 10:15   ` Marcin Juszkiewicz
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Eggleton @ 2012-11-22 10:06 UTC (permalink / raw)
  To: Marcin Juszkiewicz; +Cc: openembedded-core

On Thursday 22 November 2012 10:19:10 Marcin Juszkiewicz wrote:
> Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
> ---
>  meta/classes/archiver.bbclass | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
> index 160a3aa..ac6e401 100644
> --- a/meta/classes/archiver.bbclass
> +++ b/meta/classes/archiver.bbclass
> @@ -8,7 +8,6 @@
> 
>  ARCHIVE_EXCLUDE_FROM ?= ".pc autom4te.cache"
>  ARCHIVE_TYPE ?= "tar srpm"
> -DISTRO ?= "poky"
>  PATCHES_ARCHIVE_WITH_SERIES = 'yes'
>  SOURCE_ARCHIVE_LOG_WITH_SCRIPTS ?= '${@d.getVarFlag('ARCHIVER_MODE',
> 'log_type') \ if d.getVarFlag('ARCHIVER_MODE', 'log_type') != 'none' else
> 'logs_with_scripts'}' @@ -492,6 +491,8 @@ def create_diff_gz(d):
> 
>      s=d.getVar('S', True)
>      distro = d.getVar('DISTRO',True)
> +    if not distro:
> +        distro = ""
>      dest = s + '/' + distro + '/files'
>      if not os.path.exists(dest):
>          bb.mkdirhier(dest)

A more pythonic way to deal with this (as used elsewhere) would be:

distro = d.getVar('DISTRO',True) or ""

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



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

* [PATCH] archiver.bbclass: DISTRO is not required variable so deal with it
  2012-11-22 10:06 ` Paul Eggleton
@ 2012-11-22 10:15   ` Marcin Juszkiewicz
  0 siblings, 0 replies; 3+ messages in thread
From: Marcin Juszkiewicz @ 2012-11-22 10:15 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
---
 meta/classes/archiver.bbclass | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index 160a3aa..a4a2158 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -8,7 +8,6 @@
 
 ARCHIVE_EXCLUDE_FROM ?= ".pc autom4te.cache"
 ARCHIVE_TYPE ?= "tar srpm"
-DISTRO ?= "poky"
 PATCHES_ARCHIVE_WITH_SERIES = 'yes'
 SOURCE_ARCHIVE_LOG_WITH_SCRIPTS ?= '${@d.getVarFlag('ARCHIVER_MODE', 'log_type') \
     if d.getVarFlag('ARCHIVER_MODE', 'log_type') != 'none' else 'logs_with_scripts'}'
@@ -491,7 +490,7 @@ def create_diff_gz(d):
     f.close()
 
     s=d.getVar('S', True)
-    distro = d.getVar('DISTRO',True)
+    distro = d.getVar('DISTRO',True) or ""
     dest = s + '/' + distro + '/files'
     if not os.path.exists(dest):
         bb.mkdirhier(dest)
-- 
1.8.0




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

end of thread, other threads:[~2012-11-22 10:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-22  9:19 [PATCH] archiver.bbclass: DISTRO is not required variable so deal with it Marcin Juszkiewicz
2012-11-22 10:06 ` Paul Eggleton
2012-11-22 10:15   ` Marcin Juszkiewicz

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