Skip to contentSkip to conversation

package.bbclass: skip already-stripped QA test if asked for

PATCH Superseded Khem Raj 2 participants 3 messages Sep 6, 2013

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 package.bbclass: skip already-stripped QA test if asked for

Some packages like grub have already stripped binaries e.g.

ERROR: QA Issue: File '/boot/grub/kernel.img' from grub was already stripped, this will prevent future debugging!
ERROR: QA run found fatal errors. Please consider fixing them.

We would like to have a possibility to skip it using something like

INSANE_SKIP_${PN} = "already-stripped"

This adds the logic to do so

it acts at PN level and not at package level. so something like

INSANE_SKIP_${PN}-misc = "already-stripped" wont work.

---
 meta/classes/package.bbclass | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
meta/classes/package.bbclass +5 -2
index 50490bc..96e649a 100644
@@ -811,8 +811,11 @@ python split_and_strip_files () {
                     elf_file = isELF(file)
                     if elf_file & 1:
                         if elf_file & 2:
-                            msg = "File '%s' from %s was already stripped, this will prevent future debugging!" % (file[len(dvar):], pn)
-                            package_qa_handle_error("already-stripped", msg, d)
+                            if 'already-stripped' in (d.getVar('INSANE_SKIP_' + pn, True) or "").split():
+                                bb.note("Package %s skipping already-stripped QA test" % (pn))
+                            else:
+                                msg = "File '%s' from %s was already stripped, this will prevent future debugging!" % (file[len(dvar):], pn)
+                                package_qa_handle_error("already-stripped", msg, d)
                             continue
                         # Check if it's a hard link to something else
                         if s.st_nlink > 1:
Signature · 1 line
1.8.4
#1 lore raw
Quoted 34 lines · Khem Raj

Some packages like grub have already stripped binaries e.g.

ERROR: QA Issue: File '/boot/grub/kernel.img' from grub was already stripped, this will prevent future debugging!
ERROR: QA run found fatal errors. Please consider fixing them.

We would like to have a possibility to skip it using something like

INSANE_SKIP_${PN} = "already-stripped"

This adds the logic to do so

it acts at PN level and not at package level. so something like

INSANE_SKIP_${PN}-misc = "already-stripped" wont work.

---
 meta/classes/package.bbclass | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
meta/classes/package.bbclass +1 -2
index 50490bc..96e649a 100644
@@ -811,8 +811,11 @@ python split_and_strip_files () {
                     elf_file = isELF(file)
                     if elf_file & 1:
                         if elf_file & 2:
-                            msg = "File '%s' from %s was already
 stripped, this will prevent future debugging!" % (file[len(dvar):], pn)
-                            package_qa_handle_error("already-stripped",
 msg, d)
+                            if 'already-stripped' in
Quoted 4 lines

(d.getVar('INSANE_SKIP_' + pn, True) or "").split():
+ bb.note("Package %s skipping
already-stripped QA test" % (pn))

This seems like it must be inside a loop over each file, yet the message here is about the package, not the file, so I expect the task log may show a ton of duplicate messages, eh? :)

Signature · 1 line
Christopher Larson
author
#2 lore raw
Quoted 28 lines · Chris Larson

On Fri, Sep 6, 2013 at 1:35 AM, Khem Raj <[email protected]> wrote:
Some packages like grub have already stripped binaries e.g.

ERROR: QA Issue: File '/boot/grub/kernel.img' from grub was already stripped, this will prevent future debugging!
ERROR: QA run found fatal errors. Please consider fixing them.

We would like to have a possibility to skip it using something like

INSANE_SKIP_${PN} = "already-stripped"

This adds the logic to do so

it acts at PN level and not at package level. so something like

INSANE_SKIP_${PN}-misc = "already-stripped" wont work.

---
 meta/classes/package.bbclass | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
meta/classes/package.bbclass +0 -0
index 50490bc..96e649a 100644

meta/classes/package.bbclass python split_and_strip_files () { · line 817

Quoted 9 lines
meta/classes/package.bbclass +2 -2
@@ -811,8 +811,11 @@ python split_and_strip_files () {
                     elf_file = isELF(file)
                     if elf_file & 1:
                         if elf_file & 2:
-                            msg = "File '%s' from %s was already stripped, this will prevent future debugging!" % (file[len(dvar):], pn)
-                            package_qa_handle_error("already-stripped", msg, d)
+                            if 'already-stripped' in (d.getVar('INSANE_SKIP_' + pn, True) or "").split():
+                                bb.note("Package %s skipping already-stripped QA test" % (pn))
 
 This seems like it must be inside a loop over each file, yet the message here is about the package, not the file, so I expect the task log may show a ton of duplicate messages, eh? :)

Thanks yes. I will send a V2

Quoted 2 lines
meta/classes/package.bbclass +0 -1
-- 

Christopher Larson