Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/3] distrodata.bbclass/distro_check.py: Fix PN mapping
@ 2015-03-31 20:11 Beth Flanagan
  2015-03-31 20:11 ` [PATCH 1/3] distrodata.bbclass/distro_check.py: Fix splits Beth Flanagan
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Beth Flanagan @ 2015-03-31 20:11 UTC (permalink / raw)
  To: openembedded-core

Last night while running distrodata, I noticed some incorrect results that had
to do with how we were trying to get the mapping to the base PN name of
packages.

Part of this is due to how distrodata was splitting PNs to remove nativesdk-,
cross-, crosssdk-, etc. This occurred on packages that had the need to strip out
multiple of these strings (nativesdk-cross- for example).

The first patch ensures that in these cases we grab the distrodate from
the base PN.

The final two patches support -dummy and buildtools- packages, so that they 
also map.

Beth Flanagan (3):
  distrodata.bbclass/distro_check.py: Fix splits
  distrodata.bbclass/distro_check.py: Support -dummy mapping of PN
  distrodata.bbclass/distro_check.py: Support buildtools PN mapping

 meta/classes/distrodata.bbclass | 127 ++++++++++++++++++++++------------------
 meta/lib/oe/distro_check.py     |  54 +++++++++--------
 2 files changed, 98 insertions(+), 83 deletions(-)

-- 
1.9.1

-------------------------------------------------------------
Intel Ireland Limited (Branch)
Collinstown Industrial Park, Leixlip, County Kildare, Ireland
Registered Number: E902934

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.



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

* [PATCH 1/3] distrodata.bbclass/distro_check.py: Fix splits
  2015-03-31 20:11 [PATCH 0/3] distrodata.bbclass/distro_check.py: Fix PN mapping Beth Flanagan
@ 2015-03-31 20:11 ` Beth Flanagan
  2015-03-31 22:03   ` Burton, Ross
  2015-03-31 20:11 ` [PATCH 2/3] distrodata.bbclass/distro_check.py: Support -dummy mapping of PN Beth Flanagan
  2015-03-31 20:11 ` [PATCH 3/3] distrodata.bbclass/distro_check.py: Support buildtools PN mapping Beth Flanagan
  2 siblings, 1 reply; 9+ messages in thread
From: Beth Flanagan @ 2015-03-31 20:11 UTC (permalink / raw)
  To: openembedded-core

When we're trying to get the name of the package for
nativesdk/cross/crosssdk this bit of code fails to do
this right for things like nativesdk-foo-cross.

This ensures that a package like nativesdk-glibc-initial
maps to glibc and not to nativesdk-glibc

Signed-off-by: Beth Flanagan <elizabeth.flanagan@intel.com>
---
 meta/classes/distrodata.bbclass | 105 ++++++++++++++++++----------------------
 meta/lib/oe/distro_check.py     |  46 ++++++++----------
 2 files changed, 67 insertions(+), 84 deletions(-)

diff --git a/meta/classes/distrodata.bbclass b/meta/classes/distrodata.bbclass
index 83aa381..10e59d3 100644
--- a/meta/classes/distrodata.bbclass
+++ b/meta/classes/distrodata.bbclass
@@ -25,37 +25,30 @@ python do_distrodata_np() {
         distro_check_dir = os.path.join(tmpdir, "distro_check")
         datetime = localdata.getVar('DATETIME', True)
         dist_check.update_distro_data(distro_check_dir, datetime)
+        pnstripped = pn
 
-        if pn.find("-native") != -1:
-            pnstripped = pn.split("-native")
+        if pnstripped.find("-native") != -1:
+            pnstripped = pnstripped.split("-native")[0]
             bb.note("Native Split: %s" % pnstripped)
-            localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
-            bb.data.update_data(localdata)
 
-        if pn.find("-cross") != -1:
-            pnstripped = pn.split("-cross")
+        if pnstripped.find("-cross") != -1:
+            pnstripped = pnstripped.split("-cross")[0]
             bb.note("cross Split: %s" % pnstripped)
-            localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
-            bb.data.update_data(localdata)
 
-        if pn.find("-crosssdk") != -1:
-            pnstripped = pn.split("-crosssdk")
-            bb.note("cross Split: %s" % pnstripped)
-            localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
-            bb.data.update_data(localdata)
+        if pnstripped.find("-crosssdk") != -1:
+            pnstripped = pnstripped.split("-crosssdk")[0]
+            bb.note("crosssdk Split: %s" % pnstripped)
 
-        if pn.startswith("nativesdk-"):
-            pnstripped = pn.replace("nativesdk-", "")
+        if pnstripped.startswith("nativesdk-"):
+            pnstripped = pnstripped.replace("nativesdk-", "")
             bb.note("NativeSDK Split: %s" % pnstripped)
-            localdata.setVar('OVERRIDES', "pn-" + pnstripped + ":" + d.getVar('OVERRIDES', True))
-            bb.data.update_data(localdata)
-
 
-        if pn.find("-initial") != -1:
-            pnstripped = pn.split("-initial")
+        if pnstripped.find("-initial") != -1:
+            pnstripped = pnstripped.split("-initial")[0]
             bb.note("initial Split: %s" % pnstripped)
-            localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
-            bb.data.update_data(localdata)
+
+        localdata.setVar('OVERRIDES', "pn-" + pnstripped + ":" + d.getVar('OVERRIDES', True))
+        bb.data.update_data(localdata)
 
         """generate package information from .bb file"""
         pname = localdata.getVar('PN', True)
@@ -112,36 +105,30 @@ python do_distrodata() {
 
         pn = d.getVar("PN", True)
         bb.note("Package Name: %s" % pn)
+        pnstripped = pn
 
-        if pn.find("-native") != -1:
-            pnstripped = pn.split("-native")
+        if pnstripped.find("-native") != -1:
+            pnstripped = pnstripped.split("-native")[0]
             bb.note("Native Split: %s" % pnstripped)
-            localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
-            bb.data.update_data(localdata)
 
-        if pn.startswith("nativesdk-"):
-            pnstripped = pn.replace("nativesdk-", "")
+        if pnstripped.startswith("nativesdk-"):
+            pnstripped = pnstripped.replace("nativesdk-", "")
             bb.note("NativeSDK Split: %s" % pnstripped)
-            localdata.setVar('OVERRIDES', "pn-" + pnstripped + ":" + d.getVar('OVERRIDES', True))
-            bb.data.update_data(localdata)
 
-        if pn.find("-cross") != -1:
-            pnstripped = pn.split("-cross")
+        if pnstripped.find("-cross") != -1:
+            pnstripped = pnstripped.split("-cross")[0]
             bb.note("cross Split: %s" % pnstripped)
-            localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
-            bb.data.update_data(localdata)
 
-        if pn.find("-crosssdk") != -1:
-            pnstripped = pn.split("-crosssdk")
-            bb.note("cross Split: %s" % pnstripped)
-            localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
-            bb.data.update_data(localdata)
+        if pnstripped.find("-crosssdk") != -1:
+            pnstripped = pnstripped.split("-crosssdk")[0]
+            bb.note("crosssdk Split: %s" % pnstripped)
 
-        if pn.find("-initial") != -1:
-            pnstripped = pn.split("-initial")
+        if pnstripped.find("-initial") != -1:
+            pnstripped = pnstripped.split("-initial")[0]
             bb.note("initial Split: %s" % pnstripped)
-            localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
-            bb.data.update_data(localdata)
+
+        localdata.setVar('OVERRIDES', "pn-" + pnstripped + ":" + d.getVar('OVERRIDES', True))
+        bb.data.update_data(localdata)
 
         """generate package information from .bb file"""
         pname = localdata.getVar('PN', True)
@@ -280,34 +267,34 @@ python do_checkpkg() {
 
         """generate package information from .bb file"""
         pname = d.getVar('PN', True)
+        pnstripped = pname
 
-        if pname.find("-native") != -1:
+        if pnstripped.find("-native") != -1:
             if d.getVar('BBCLASSEXTEND', True):
                     return
-            pnstripped = pname.split("-native")
+            pnstripped = pnstripped.split("-native")[0]
             bb.note("Native Split: %s" % pnstripped)
-            localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
-            bb.data.update_data(localdata)
 
-        if pname.startswith("nativesdk-"):
+        if pnstripped.startswith("nativesdk-"):
             if d.getVar('BBCLASSEXTEND', True):
                     return
-            pnstripped = pname.replace("nativesdk-", "")
+            pnstripped = pnstripped.replace("nativesdk-", "")
             bb.note("NativeSDK Split: %s" % pnstripped)
-            localdata.setVar('OVERRIDES', "pn-" + pnstripped + ":" + d.getVar('OVERRIDES', True))
-            bb.data.update_data(localdata)
 
-        if pname.find("-cross") != -1:
-            pnstripped = pname.split("-cross")
+        if pnstripped.find("-cross") != -1:
+            pnstripped = pnstripped.split("-cross")[0]
             bb.note("cross Split: %s" % pnstripped)
-            localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
-            bb.data.update_data(localdata)
 
-        if pname.find("-initial") != -1:
-            pnstripped = pname.split("-initial")
+        if pnstripped.find("-crosssdk") != -1:
+            pnstripped = pnstripped.split("-cross")[0]
+            bb.note("crosssdk Split: %s" % pnstripped)
+
+        if pnstripped.find("-initial") != -1:
+            pnstripped = pnstripped.split("-initial")[0]
             bb.note("initial Split: %s" % pnstripped)
-            localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
-            bb.data.update_data(localdata)
+
+        localdata.setVar('OVERRIDES', "pn-" + pnstripped + ":" + d.getVar('OVERRIDES', True))
+        bb.data.update_data(localdata)
 
         pdesc = localdata.getVar('DESCRIPTION', True)
         pgrp = localdata.getVar('SECTION', True)
diff --git a/meta/lib/oe/distro_check.py b/meta/lib/oe/distro_check.py
index 8ed5b0e..f754991 100644
--- a/meta/lib/oe/distro_check.py
+++ b/meta/lib/oe/distro_check.py
@@ -278,32 +278,28 @@ def compare_in_distro_packages_list(distro_check_dir, d):
     pn = d.getVar('PN', True)
     recipe_name = d.getVar('PN', True)
     bb.note("Checking: %s" % pn)
+    pnstripped = pn
+    trim_dict = dict({"-native":"-native", "-cross":"-cross", "-crosssdk":"-crosssdk" ,"-initial":"-initial"})
 
-    trim_dict = dict({"-native":"-native", "-cross":"-cross", "-initial":"-initial"})
-
-    if pn.find("-native") != -1:
-        pnstripped = pn.split("-native")
-        localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
-        bb.data.update_data(localdata)
-        recipe_name = pnstripped[0]
-
-    if pn.startswith("nativesdk-"):
-        pnstripped = pn.split("nativesdk-")
-        localdata.setVar('OVERRIDES', "pn-" + pnstripped[1] + ":" + d.getVar('OVERRIDES', True))
-        bb.data.update_data(localdata)
-        recipe_name = pnstripped[1]
-
-    if pn.find("-cross") != -1:
-        pnstripped = pn.split("-cross")
-        localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
-        bb.data.update_data(localdata)
-        recipe_name = pnstripped[0]
-
-    if pn.find("-initial") != -1:
-        pnstripped = pn.split("-initial")
-        localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
-        bb.data.update_data(localdata)
-        recipe_name = pnstripped[0]
+    if pnstripped.find("-native") != -1:
+        pnstripped = pnstripped.split("-native")[0]
+
+    if pnstripped.startswith("nativesdk-"):
+        pnstripped = pnstripped.split("nativesdk-")[1]
+
+    if pnstripped.find("-cross") != -1:
+        pnstripped = pnstripped.split("-cross")[0]
+
+    if pnstripped.find("-crosssdk") != -1:
+        pnstripped = pnstripped.split("-crosssdk")[0]
+
+    if pnstripped.find("-initial") != -1:
+        pnstripped = pnstripped.split("-initial")[0]
+
+    localdata.setVar('OVERRIDES', "pn-" + pnstripped + ":" + d.getVar('OVERRIDES', True))
+
+    bb.data.update_data(localdata)
+    recipe_name = pnstripped
 
     bb.note("Recipe: %s" % recipe_name)
     tmp = localdata.getVar('DISTRO_PN_ALIAS', True)
-- 
1.9.1

-------------------------------------------------------------
Intel Ireland Limited (Branch)
Collinstown Industrial Park, Leixlip, County Kildare, Ireland
Registered Number: E902934

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.



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

* [PATCH 2/3] distrodata.bbclass/distro_check.py: Support -dummy mapping of PN
  2015-03-31 20:11 [PATCH 0/3] distrodata.bbclass/distro_check.py: Fix PN mapping Beth Flanagan
  2015-03-31 20:11 ` [PATCH 1/3] distrodata.bbclass/distro_check.py: Fix splits Beth Flanagan
@ 2015-03-31 20:11 ` Beth Flanagan
  2015-03-31 20:11 ` [PATCH 3/3] distrodata.bbclass/distro_check.py: Support buildtools PN mapping Beth Flanagan
  2 siblings, 0 replies; 9+ messages in thread
From: Beth Flanagan @ 2015-03-31 20:11 UTC (permalink / raw)
  To: openembedded-core

Strip out -dummy in order to map to the base PN of dummy packages

Signed-off-by: Beth Flanagan <elizabeth.flanagan@intel.com>
---
 meta/classes/distrodata.bbclass | 12 ++++++++++++
 meta/lib/oe/distro_check.py     |  7 ++++++-
 2 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/meta/classes/distrodata.bbclass b/meta/classes/distrodata.bbclass
index 10e59d3..6562c86 100644
--- a/meta/classes/distrodata.bbclass
+++ b/meta/classes/distrodata.bbclass
@@ -47,6 +47,10 @@ python do_distrodata_np() {
             pnstripped = pnstripped.split("-initial")[0]
             bb.note("initial Split: %s" % pnstripped)
 
+        if pnstripped.find("-dummy") != -1:
+            pnstripped = pnstripped.split("-dummy")
+            bb.note("dummy Split: %s" % pnstripped)
+
         localdata.setVar('OVERRIDES', "pn-" + pnstripped + ":" + d.getVar('OVERRIDES', True))
         bb.data.update_data(localdata)
 
@@ -127,6 +131,10 @@ python do_distrodata() {
             pnstripped = pnstripped.split("-initial")[0]
             bb.note("initial Split: %s" % pnstripped)
 
+        if pnstripped.find("-dummy") != -1:
+            pnstripped = pnstripped.split("-dummy")[0]
+            bb.note("dummy Split: %s" % pnstripped)
+
         localdata.setVar('OVERRIDES', "pn-" + pnstripped + ":" + d.getVar('OVERRIDES', True))
         bb.data.update_data(localdata)
 
@@ -293,6 +301,10 @@ python do_checkpkg() {
             pnstripped = pnstripped.split("-initial")[0]
             bb.note("initial Split: %s" % pnstripped)
 
+        if pnstripped.find("-dummy") != -1:
+            pnstripped = pnstripped.split("-dummy")[0]
+            bb.note("dummy Split: %s" % pnstripped)
+
         localdata.setVar('OVERRIDES', "pn-" + pnstripped + ":" + d.getVar('OVERRIDES', True))
         bb.data.update_data(localdata)
 
diff --git a/meta/lib/oe/distro_check.py b/meta/lib/oe/distro_check.py
index f754991..d13783b 100644
--- a/meta/lib/oe/distro_check.py
+++ b/meta/lib/oe/distro_check.py
@@ -279,7 +279,9 @@ def compare_in_distro_packages_list(distro_check_dir, d):
     recipe_name = d.getVar('PN', True)
     bb.note("Checking: %s" % pn)
     pnstripped = pn
-    trim_dict = dict({"-native":"-native", "-cross":"-cross", "-crosssdk":"-crosssdk" ,"-initial":"-initial"})
+    trim_dict = dict({"-native":"-native", "-cross":"-cross", \
+                      "-crosssdk":"-crosssdk" ,"-initial":"-initial", \
+                      "-dummy":"-dummy"})
 
     if pnstripped.find("-native") != -1:
         pnstripped = pnstripped.split("-native")[0]
@@ -296,6 +298,9 @@ def compare_in_distro_packages_list(distro_check_dir, d):
     if pnstripped.find("-initial") != -1:
         pnstripped = pnstripped.split("-initial")[0]
 
+    if pnstripped.find("-dummy") != -1:
+        pnstripped = pnstripped.split("-dummy")[0]
+
     localdata.setVar('OVERRIDES', "pn-" + pnstripped + ":" + d.getVar('OVERRIDES', True))
 
     bb.data.update_data(localdata)
-- 
1.9.1

-------------------------------------------------------------
Intel Ireland Limited (Branch)
Collinstown Industrial Park, Leixlip, County Kildare, Ireland
Registered Number: E902934

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.



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

* [PATCH 3/3] distrodata.bbclass/distro_check.py: Support buildtools PN mapping
  2015-03-31 20:11 [PATCH 0/3] distrodata.bbclass/distro_check.py: Fix PN mapping Beth Flanagan
  2015-03-31 20:11 ` [PATCH 1/3] distrodata.bbclass/distro_check.py: Fix splits Beth Flanagan
  2015-03-31 20:11 ` [PATCH 2/3] distrodata.bbclass/distro_check.py: Support -dummy mapping of PN Beth Flanagan
@ 2015-03-31 20:11 ` Beth Flanagan
  2015-03-31 22:31   ` Burton, Ross
  2 siblings, 1 reply; 9+ messages in thread
From: Beth Flanagan @ 2015-03-31 20:11 UTC (permalink / raw)
  To: openembedded-core

We need to be able to map buildtools- to the original PN.

Signed-off-by: Beth Flanagan <elizabeth.flanagan@intel.com>
---
 meta/classes/distrodata.bbclass | 12 ++++++++++++
 meta/lib/oe/distro_check.py     |  3 +++
 2 files changed, 15 insertions(+)

diff --git a/meta/classes/distrodata.bbclass b/meta/classes/distrodata.bbclass
index 6562c86..f540170 100644
--- a/meta/classes/distrodata.bbclass
+++ b/meta/classes/distrodata.bbclass
@@ -43,6 +43,10 @@ python do_distrodata_np() {
             pnstripped = pnstripped.replace("nativesdk-", "")
             bb.note("NativeSDK Split: %s" % pnstripped)
 
+        if pnstripped.find("buildtools-") != -1:
+            pnstripped = pnstripped.split("buildtools-")[1]
+            bb.note("buildtools Split: %s" % pnstripped)
+
         if pnstripped.find("-initial") != -1:
             pnstripped = pnstripped.split("-initial")[0]
             bb.note("initial Split: %s" % pnstripped)
@@ -119,6 +123,10 @@ python do_distrodata() {
             pnstripped = pnstripped.replace("nativesdk-", "")
             bb.note("NativeSDK Split: %s" % pnstripped)
 
+        if pnstripped.find("buildtools-") != -1:
+            pnstripped = pnstripped.split("buildtools-")[1]
+            bb.note("buildtools Split: %s" % pnstripped)
+
         if pnstripped.find("-cross") != -1:
             pnstripped = pnstripped.split("-cross")[0]
             bb.note("cross Split: %s" % pnstripped)
@@ -289,6 +297,10 @@ python do_checkpkg() {
             pnstripped = pnstripped.replace("nativesdk-", "")
             bb.note("NativeSDK Split: %s" % pnstripped)
 
+        if pnstripped.find("buildtools-") != -1:
+            pnstripped = pnstripped.split("buildtools-")[1]
+            bb.note("buildtools Split: %s" % pnstripped)
+
         if pnstripped.find("-cross") != -1:
             pnstripped = pnstripped.split("-cross")[0]
             bb.note("cross Split: %s" % pnstripped)
diff --git a/meta/lib/oe/distro_check.py b/meta/lib/oe/distro_check.py
index d13783b..88474d0 100644
--- a/meta/lib/oe/distro_check.py
+++ b/meta/lib/oe/distro_check.py
@@ -289,6 +289,9 @@ def compare_in_distro_packages_list(distro_check_dir, d):
     if pnstripped.startswith("nativesdk-"):
         pnstripped = pnstripped.split("nativesdk-")[1]
 
+    if pnstripped.find("buildtools-") != -1:
+        pnstripped = pnstripped.split("buildtools-")[1]
+
     if pnstripped.find("-cross") != -1:
         pnstripped = pnstripped.split("-cross")[0]
 
-- 
1.9.1

-------------------------------------------------------------
Intel Ireland Limited (Branch)
Collinstown Industrial Park, Leixlip, County Kildare, Ireland
Registered Number: E902934

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.



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

* Re: [PATCH 1/3] distrodata.bbclass/distro_check.py: Fix splits
  2015-03-31 20:11 ` [PATCH 1/3] distrodata.bbclass/distro_check.py: Fix splits Beth Flanagan
@ 2015-03-31 22:03   ` Burton, Ross
  2015-03-31 22:29     ` Burton, Ross
  2015-03-31 22:29     ` Flanagan, Elizabeth
  0 siblings, 2 replies; 9+ messages in thread
From: Burton, Ross @ 2015-03-31 22:03 UTC (permalink / raw)
  To: Beth Flanagan; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 221 bytes --]

On 31 March 2015 at 21:11, Beth Flanagan <elizabeth.flanagan@intel.com>
wrote:

> +        if pnstripped.find("-native") != -1:
>

Shouldn't this be .endswith() or .startswith() to prevent false-positives?

Ross

[-- Attachment #2: Type: text/html, Size: 653 bytes --]

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

* Re: [PATCH 1/3] distrodata.bbclass/distro_check.py: Fix splits
  2015-03-31 22:03   ` Burton, Ross
@ 2015-03-31 22:29     ` Burton, Ross
  2015-03-31 22:29     ` Flanagan, Elizabeth
  1 sibling, 0 replies; 9+ messages in thread
From: Burton, Ross @ 2015-03-31 22:29 UTC (permalink / raw)
  To: Beth Flanagan; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 695 bytes --]

On 31 March 2015 at 23:03, Burton, Ross <ross.burton@intel.com> wrote:

>
> On 31 March 2015 at 21:11, Beth Flanagan <elizabeth.flanagan@intel.com>
> wrote:
>
>> +        if pnstripped.find("-native") != -1:
>>
>
> Shouldn't this be .endswith() or .startswith() to prevent false-positives?
>

Also this all clearly says "put me in a function".  But what you need is
*almost* the BPN variable but with some prefix stripping that the BPN-logic
doesn't do (BPN only has suffix stripped, oddly).

I'd argue that the BPN logic should also strip nativesdk- prefixes, so by
fixing that the distrotools class could just get PN and BPN from the data
store and be done with it.

Ross

[-- Attachment #2: Type: text/html, Size: 1416 bytes --]

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

* Re: [PATCH 1/3] distrodata.bbclass/distro_check.py: Fix splits
  2015-03-31 22:03   ` Burton, Ross
  2015-03-31 22:29     ` Burton, Ross
@ 2015-03-31 22:29     ` Flanagan, Elizabeth
  1 sibling, 0 replies; 9+ messages in thread
From: Flanagan, Elizabeth @ 2015-03-31 22:29 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

On 31 March 2015 at 23:03, Burton, Ross <ross.burton@intel.com> wrote:
>
> On 31 March 2015 at 21:11, Beth Flanagan <elizabeth.flanagan@intel.com>
> wrote:
>>
>> +        if pnstripped.find("-native") != -1:
>
>
> Shouldn't this be .endswith() or .startswith() to prevent false-positives?
>

Not that we'd ever end up with something like foo-native-dummy (watch
someone prove that wrong), but we wouldn't want .endswith() here as
that would end up with bad data as well. I'm by no means happy with
the solution here, but for the time being it gets packagedata and
check_package working and not spitting out incorrect data.

I think we probably need to take a better look at packagedata and
check_package in 1.9, especially with how we map this to the actual
PN, but in this case, I was of the opinion that better was the enemy
of good enough.

> Ross
>
> ---------------------------------------------------------------------
> Intel Corporation (UK) Limited
> Registered No. 1134945 (England)
> Registered Office: Pipers Way, Swindon SN3 1RJ
> VAT No: 860 2173 47
>
> This e-mail and any attachments may contain confidential material for
> the sole use of the intended recipient(s). Any review or distribution
> by others is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete all copies.



-- 
Elizabeth Flanagan
Yocto Project
Build and Release


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

* Re: [PATCH 3/3] distrodata.bbclass/distro_check.py: Support buildtools PN mapping
  2015-03-31 20:11 ` [PATCH 3/3] distrodata.bbclass/distro_check.py: Support buildtools PN mapping Beth Flanagan
@ 2015-03-31 22:31   ` Burton, Ross
  2015-03-31 22:52     ` Flanagan, Elizabeth
  0 siblings, 1 reply; 9+ messages in thread
From: Burton, Ross @ 2015-03-31 22:31 UTC (permalink / raw)
  To: Beth Flanagan; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 356 bytes --]

On 31 March 2015 at 21:11, Beth Flanagan <elizabeth.flanagan@intel.com>
wrote:

> We need to be able to map buildtools- to the original PN.
>

What packages are prefixed buildtools-?  I can only see a
buildtools-tarball and nativesdk-buildtools-perl-dummy, neither of which
can be considered to have a "real PN" of tarball or perl really.

Ross

[-- Attachment #2: Type: text/html, Size: 779 bytes --]

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

* Re: [PATCH 3/3] distrodata.bbclass/distro_check.py: Support buildtools PN mapping
  2015-03-31 22:31   ` Burton, Ross
@ 2015-03-31 22:52     ` Flanagan, Elizabeth
  0 siblings, 0 replies; 9+ messages in thread
From: Flanagan, Elizabeth @ 2015-03-31 22:52 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

On 31 March 2015 at 23:31, Burton, Ross <ross.burton@intel.com> wrote:
>
> On 31 March 2015 at 21:11, Beth Flanagan <elizabeth.flanagan@intel.com>
> wrote:
>>
>> We need to be able to map buildtools- to the original PN.
>
>
> What packages are prefixed buildtools-?  I can only see a buildtools-tarball
> and nativesdk-buildtools-perl-dummy, neither of which can be considered to
> have a "real PN" of tarball or perl really.
>
> Ross

Agreed. Looking at the two recipes that use this, I think it's
probably safe to just exclude packages that have buildtools- prefixes.

-b

>
> ---------------------------------------------------------------------
> Intel Corporation (UK) Limited
> Registered No. 1134945 (England)
> Registered Office: Pipers Way, Swindon SN3 1RJ
> VAT No: 860 2173 47
>
> This e-mail and any attachments may contain confidential material for
> the sole use of the intended recipient(s). Any review or distribution
> by others is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete all copies.



-- 
Elizabeth Flanagan
Yocto Project
Build and Release


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

end of thread, other threads:[~2015-03-31 22:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-31 20:11 [PATCH 0/3] distrodata.bbclass/distro_check.py: Fix PN mapping Beth Flanagan
2015-03-31 20:11 ` [PATCH 1/3] distrodata.bbclass/distro_check.py: Fix splits Beth Flanagan
2015-03-31 22:03   ` Burton, Ross
2015-03-31 22:29     ` Burton, Ross
2015-03-31 22:29     ` Flanagan, Elizabeth
2015-03-31 20:11 ` [PATCH 2/3] distrodata.bbclass/distro_check.py: Support -dummy mapping of PN Beth Flanagan
2015-03-31 20:11 ` [PATCH 3/3] distrodata.bbclass/distro_check.py: Support buildtools PN mapping Beth Flanagan
2015-03-31 22:31   ` Burton, Ross
2015-03-31 22:52     ` Flanagan, Elizabeth

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