* [PATCH] insane.bbclass: Enhance file-rdeps QA check
@ 2015-02-23 19:04 Alejandro Hernandez
2015-02-23 19:49 ` Otavio Salvador
2015-02-24 23:44 ` Richard Purdie
0 siblings, 2 replies; 4+ messages in thread
From: Alejandro Hernandez @ 2015-02-23 19:04 UTC (permalink / raw)
To: openembedded-core
Adds symlink-to-sysroot check to the QA_WARN, Changes filerdepends
from set() to dict(), hence methodsfor adding or deleting items had
to change, keeps track of the key:value relationship, flags the
issue along with the offending file accordingly.
Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
---
meta/classes/insane.bbclass | 26 +++++++++++---------------
1 file changed, 11 insertions(+), 15 deletions(-)
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 143ec46..542346a 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -34,7 +34,7 @@ WARN_QA ?= "ldflags useless-rpaths rpaths staticdev libdir xorg-driver-abi \
ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \
perms dep-cmp pkgvarcheck perm-config perm-line perm-link \
split-strip packages-list pkgv-undefined var-undefined \
- version-going-backwards \
+ version-going-backwards symlink-to-sysroot\
"
ALL_QA = "${WARN_QA} ${ERROR_QA}"
@@ -604,7 +604,6 @@ def package_qa_check_symlink_to_sysroot(path, name, d, elf, messages):
if target.startswith(tmpdir):
trimmed = path.replace(os.path.join (d.getVar("PKGDEST", True), name), "")
messages["symlink-to-sysroot"] = "Symlink %s in %s points to TMPDIR" % (trimmed, name)
-
def package_qa_check_license(workdir, d):
"""
Check for changes in the license files
@@ -803,13 +802,14 @@ def package_qa_check_rdepends(pkg, pkgdest, skip, taskdeps, packages, d):
if bb.data.inherits_class('nativesdk', d):
ignored_file_rdeps |= set(['/bin/bash', '/usr/bin/perl'])
# For Saving the FILERDEPENDS
- filerdepends = set()
+ filerdepends = {}
rdep_data = oe.packagedata.read_subpkgdata(pkg, d)
for key in rdep_data:
if key.startswith("FILERDEPENDS_"):
for subkey in rdep_data[key].split():
- filerdepends.add(subkey)
- filerdepends -= ignored_file_rdeps
+ if subkey not in ignored_file_rdeps:
+ # We already know it starts with FILERDEPENDS_
+ filerdepends[subkey] = key[13:]
if filerdepends:
next = rdepends
@@ -841,31 +841,27 @@ def package_qa_check_rdepends(pkg, pkgdest, skip, taskdeps, packages, d):
# case there is a RDEPENDS_pkg = "python" in the recipe.
for py in [ d.getVar('MLPREFIX', True) + "python", "python" ]:
if py in done:
- filerdepends.discard("/usr/bin/python")
+ filerdepends.pop("/usr/bin/python",None)
done.remove(py)
for rdep in done:
# For Saving the FILERPROVIDES, RPROVIDES and FILES_INFO
- rdep_rprovides = set()
rdep_data = oe.packagedata.read_subpkgdata(rdep, d)
for key in rdep_data:
if key.startswith("FILERPROVIDES_") or key.startswith("RPROVIDES_"):
for subkey in rdep_data[key].split():
- rdep_rprovides.add(subkey)
+ filerdepends.pop(subkey,None)
# Add the files list to the rprovides
if key == "FILES_INFO":
# Use eval() to make it as a dict
for subkey in eval(rdep_data[key]):
- rdep_rprovides.add(subkey)
- filerdepends -= rdep_rprovides
+ filerdepends.pop(subkey,None)
if not filerdepends:
# Break if all the file rdepends are met
break
- else:
- # Clear it for the next loop
- rdep_rprovides.clear()
if filerdepends:
- error_msg = "%s requires %s, but no providers in its RDEPENDS" % \
- (pkg, ', '.join(str(e) for e in filerdepends))
+ for key in filerdepends:
+ error_msg = "%s contained in package %s requires %s, but no providers found in its RDEPENDS" % \
+ (filerdepends[key],pkg, key)
sane = package_qa_handle_error("file-rdeps", error_msg, d)
return sane
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] insane.bbclass: Enhance file-rdeps QA check
2015-02-23 19:04 [PATCH] insane.bbclass: Enhance file-rdeps QA check Alejandro Hernandez
@ 2015-02-23 19:49 ` Otavio Salvador
2015-02-25 21:43 ` Alejandro Hernandez
2015-02-24 23:44 ` Richard Purdie
1 sibling, 1 reply; 4+ messages in thread
From: Otavio Salvador @ 2015-02-23 19:49 UTC (permalink / raw)
To: Alejandro Hernandez; +Cc: Patches and discussions about the oe-core layer
On Mon, Feb 23, 2015 at 4:04 PM, Alejandro Hernandez
<alejandro.hernandez@linux.intel.com> wrote:
> Adds symlink-to-sysroot check to the QA_WARN, Changes filerdepends
> from set() to dict(), hence methodsfor adding or deleting items had
methods for
> to change, keeps track of the key:value relationship, flags the
> issue along with the offending file accordingly.
>
> Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
> ---
> meta/classes/insane.bbclass | 26 +++++++++++---------------
> 1 file changed, 11 insertions(+), 15 deletions(-)
>
> diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
> index 143ec46..542346a 100644
> --- a/meta/classes/insane.bbclass
> +++ b/meta/classes/insane.bbclass
> @@ -34,7 +34,7 @@ WARN_QA ?= "ldflags useless-rpaths rpaths staticdev libdir xorg-driver-abi \
> ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \
> perms dep-cmp pkgvarcheck perm-config perm-line perm-link \
> split-strip packages-list pkgv-undefined var-undefined \
> - version-going-backwards \
> + version-going-backwards symlink-to-sysroot\
Is this a 'development change' which should be dropped or another
change which should go in another commit?
Please take a look on the 'sed' warning when building with ptest. It
is a 'false-positive' failure.
--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] insane.bbclass: Enhance file-rdeps QA check
2015-02-23 19:49 ` Otavio Salvador
@ 2015-02-25 21:43 ` Alejandro Hernandez
0 siblings, 0 replies; 4+ messages in thread
From: Alejandro Hernandez @ 2015-02-25 21:43 UTC (permalink / raw)
To: Otavio Salvador; +Cc: Patches and discussions about the oe-core layer
On 23/02/15 13:49, Otavio Salvador wrote:
> @@ -34,7 +34,7 @@ WARN_QA ?= "ldflags useless-rpaths rpaths staticdev libdir xorg-driver-abi \
> ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \
> perms dep-cmp pkgvarcheck perm-config perm-line perm-link \
> split-strip packages-list pkgv-undefined var-undefined \
> - version-going-backwards \
> + version-going-backwards symlink-to-sysroot\
> Is this a 'development change' which should be dropped or another
> change which should go in another commit?
Yes, development change, this should go in WARN_QA
>
> Please take a look on the 'sed' warning when building with ptest. It
> is a 'false-positive' failure.
>
As discussed in the IRC this is related to a different bug, its a
"build-deps" bug not "file-rdeps", I would gladly fix it, although I am
not able to reproduce it so far, if anyone can and has some info, I'd
appreciate it.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] insane.bbclass: Enhance file-rdeps QA check
2015-02-23 19:04 [PATCH] insane.bbclass: Enhance file-rdeps QA check Alejandro Hernandez
2015-02-23 19:49 ` Otavio Salvador
@ 2015-02-24 23:44 ` Richard Purdie
1 sibling, 0 replies; 4+ messages in thread
From: Richard Purdie @ 2015-02-24 23:44 UTC (permalink / raw)
To: Alejandro Hernandez; +Cc: openembedded-core
On Mon, 2015-02-23 at 13:04 -0600, Alejandro Hernandez wrote:
> Adds symlink-to-sysroot check to the QA_WARN, Changes filerdepends
> from set() to dict(), hence methodsfor adding or deleting items had
> to change, keeps track of the key:value relationship, flags the
> issue along with the offending file accordingly.
I'm sure this is a good change but I'm struggling to understand it from
the message above. Could you make sure to say:
a) What the change does
b) Why its important/useful
as well as how the change modifies the code (which you cover).
Cheers,
Richard
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-02-25 21:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-23 19:04 [PATCH] insane.bbclass: Enhance file-rdeps QA check Alejandro Hernandez
2015-02-23 19:49 ` Otavio Salvador
2015-02-25 21:43 ` Alejandro Hernandez
2015-02-24 23:44 ` Richard Purdie
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.