Patchwork [1/1] sanity.bbclass: fix splitting on newlines of SANITY_TESTED_DISTROS

login
register
mail settings
Submitter Paul Eggleton
Date Sept. 1, 2011, 11:36 a.m.
Message ID <ff51425aa7ce3a4fd4f9329ff1df5e47774f56e0.1314876902.git.paul.eggleton@linux.intel.com>
Download mbox | patch
Permalink /patch/10831/
State New, archived
Headers show

Comments

Paul Eggleton - Sept. 1, 2011, 11:36 a.m.
This variable should be split with \n sequences and these need to be
specified literally in the string. A corrected version of the example
given in the original commit (OE-core rev
75e3875341ddc8940e9ee2ccbbb2ec18194a68e6):

SANITY_TESTED_DISTROS = " \
        Ubuntu 11.04 \n \
        Fedora release 14 (Laughlin) \n \
        "

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/classes/sanity.bbclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Richard Purdie - Sept. 2, 2011, 5:28 p.m.
On Thu, 2011-09-01 at 12:36 +0100, Paul Eggleton wrote:
> This variable should be split with \n sequences and these need to be
> specified literally in the string. A corrected version of the example
> given in the original commit (OE-core rev
> 75e3875341ddc8940e9ee2ccbbb2ec18194a68e6):
> 
> SANITY_TESTED_DISTROS = " \
>         Ubuntu 11.04 \n \
>         Fedora release 14 (Laughlin) \n \
>         "
> 
> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
> ---
>  meta/classes/sanity.bbclass |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Merged to master, thanks.

Richard

Patch

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 37b9028..44b0688 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -149,7 +149,7 @@  def check_supported_distro(e):
                 finally:
                     f.close()
     if distro:
-        if distro not in [x.strip() for x in tested_distros.split('\n')]:
+        if distro not in [x.strip() for x in tested_distros.split('\\n')]:
             bb.warn('Host distribution "%s" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.' % distro)
     else:
         bb.warn('Host distribution could not be determined; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.')