Skip to contentSkip to conversation

Help debug QA foo rdepends on bar-dev

PATCH Applied Mark Hatle 2 participants 3 messages May 24, 2012 – May 25, 2012

lore
Share & tools
lore

Mark Hatle

author
#0 lore raw

cover Help debug QA foo rdepends on bar-dev

After numerous attempts to try to remotely help people stuck by the QA test that a base package requires a -dev package, I needed to figure out a way to add diagnostics to the logs to help identify what was happening.

The patch adds some basic diagnostics to indicate what dependency was found and what package it triggered to be added to the rdepends.

In addition it was observed that a lot of duplicate processing was occuring so I modifed the system to eliminate the duplicates. This has the potential to improve performance, but I was not able to measure anything statistically significant in my builds.

The following changes since commit 0f795f81fe5ad3ef78c21a177eca90fbc8810f81:

qemu: disable vnc-jpeg compression (2012-05-24 08:53:40 +0100)

are available in the git repository at:
git://git.pokylinux.org/poky-contrib mhatle/package
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=mhatle/package

Mark Hatle (1):
package.bbclass: Add additional debugging for dependencies

 meta/classes/package.bbclass |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
Signature · 1 line
1.7.3.4
author
#1 lore raw

PATCH 1/1 package.bbclass: Add additional debugging for dependencies

When trying to understand why a QA wanring such as:

ERROR: QA Issue: foo rdepends on bar-dev

it is very difficult to figure out where the bar-dev dependency comes from, since many of them are added dynamically.

This adds a debug statement that says which dependency adds an rdepends to the system.

Also, while doing this work, it was noted that the same dependencies were being scanned for over and over. Instead we shorten the list by only added to the dep list if the dependency was not already there.

---
 meta/classes/package.bbclass |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
meta/classes/package.bbclass +5 -2
index 6fba5b6..8b0ac55 100644
@@ -1266,7 +1266,8 @@ python package_do_shlibs() {
 		for l in lines:
 			m = re.match("\s+NEEDED\s+([^\s]*)", l)
 			if m:
-				needed[pkg].append(m.group(1))
+				if m.group(1) not in needed[pkg]:
+					needed[pkg].append(m.group(1))
 			m = re.match("\s+SONAME\s+([^\s]*)", l)
 			if m:
 				this_soname = m.group(1)
@@ -1338,7 +1339,7 @@ python package_do_shlibs() {
 								name = dep.replace("-l", "lib")
 							if pkg not in needed:
 								needed[pkg] = []
-							if name:
+							if name and name not in needed[pkg]:
 								needed[pkg].append(name)
 								#bb.note("Adding %s for %s" % (name, pkg))
 
@@ -1443,6 +1444,8 @@ python package_do_shlibs() {
 			if n in shlib_provider.keys():
 				(dep_pkg, ver_needed) = shlib_provider[n]
 
+				bb.debug(2, '%s: Dependency %s requires package %s' % (pkg, n, dep_pkg))
+
 				if dep_pkg == pkg:
 					continue
 
Signature · 1 line
1.7.3.4
Applied
#2 lore raw
In reply to Mark Hatle
Quoted 20 lines · Mark Hatle

After numerous attempts to try to remotely help people stuck by the QA test that a base package requires a -dev package, I needed to figure out a way to add diagnostics to the logs to help identify what was happening.

The patch adds some basic diagnostics to indicate what dependency was found and what package it triggered to be added to the rdepends.

In addition it was observed that a lot of duplicate processing was occuring so I modifed the system to eliminate the duplicates. This has the potential to improve performance, but I was not able to measure anything statistically significant in my builds.

The following changes since commit 0f795f81fe5ad3ef78c21a177eca90fbc8810f81:

   qemu: disable vnc-jpeg compression (2012-05-24 08:53:40 +0100)

are available in the git repository at:
git://git.pokylinux.org/poky-contrib mhatle/package
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=mhatle/package

Quoted 6 lines

Mark Hatle (1):
package.bbclass: Add additional debugging for dependencies

  meta/classes/package.bbclass |    7 +++++--
  1 files changed, 5 insertions(+), 2 deletions(-)

Merged into OE-Core

Thanks
Sau!