Skip to contentSkip to conversation

buildhistory: handle more R* variables

PATCH New Paul Eggleton 1 participant 3 messages Feb 8, 2013

lore
Share & tools
lore
#0 lore raw

cover buildhistory: handle more R* variables

The following changes since commit 688e9485980de0f29aa00e24ce53a3efd3a3a7cc:

qemu.bbclass: fix segfaults when running through pseudo (2013-02-07 16:50:40 +0000)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib paule/buildhistory-rvars
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/buildhistory-rvars

Paul Eggleton (2):
buildhistory: record more R* variables
buildhistory_analysis: handle more R* variables

 meta/classes/buildhistory.bbclass    |   23 +++++++++++++++++++++++
 meta/lib/oe/buildhistory_analysis.py |    8 ++++----
 2 files changed, 27 insertions(+), 4 deletions(-)
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/2 buildhistory: record more R* variables

Add RPROVIDES, RREPLACES, RCONFLICTS and RSUGGESTS to the list of tracked variables. Of these, RPROVIDES is always output, whereas the others are only output if they have a value (since it is more common that they don't).

Implements [YOCTO #3391].

---
 meta/classes/buildhistory.bbclass |   23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
meta/classes/buildhistory.bbclass +23 -0
index a6fbd68..a20d03d 100644
@@ -58,8 +58,12 @@ python buildhistory_emit_pkghistory() {
             self.pkgr = ""
             self.size = 0
             self.depends = ""
+            self.rprovides = ""
             self.rdepends = ""
             self.rrecommends = ""
+            self.rsuggests = ""
+            self.rreplaces = ""
+            self.rconflicts = ""
             self.files = ""
             self.filelist = ""
             # Variables that need to be written to their own separate file
@@ -96,10 +100,18 @@ python buildhistory_emit_pkghistory() {
                     pkginfo.pkgv = value
                 elif name == "PKGR":
                     pkginfo.pkgr = value
+                elif name == "RPROVIDES":
+                    pkginfo.rprovides = value
                 elif name == "RDEPENDS":
                     pkginfo.rdepends = value
                 elif name == "RRECOMMENDS":
                     pkginfo.rrecommends = value
+                elif name == "RSUGGESTS":
+                    pkginfo.rsuggests = value
+                elif name == "RREPLACES":
+                    pkginfo.rreplaces = value
+                elif name == "RCONFLICTS":
+                    pkginfo.rconflicts = value
                 elif name == "PKGSIZE":
                     pkginfo.size = long(value)
                 elif name == "FILES":
@@ -189,8 +201,12 @@ python buildhistory_emit_pkghistory() {
         pkginfo.pkge = pkge
         pkginfo.pkgv = pkgv
         pkginfo.pkgr = pkgr
+        pkginfo.rprovides = sortpkglist(squashspaces(getpkgvar(pkg, 'RPROVIDES') or ""))
         pkginfo.rdepends = sortpkglist(squashspaces(getpkgvar(pkg, 'RDEPENDS') or ""))
         pkginfo.rrecommends = sortpkglist(squashspaces(getpkgvar(pkg, 'RRECOMMENDS') or ""))
+        pkginfo.rsuggests = sortpkglist(squashspaces(getpkgvar(pkg, 'RSUGGESTS') or ""))
+        pkginfo.rreplaces = sortpkglist(squashspaces(getpkgvar(pkg, 'RREPLACES') or ""))
+        pkginfo.rconflicts = sortpkglist(squashspaces(getpkgvar(pkg, 'RCONFLICTS') or ""))
         pkginfo.files = squashspaces(getpkgvar(pkg, 'FILES') or "")
         for filevar in pkginfo.filevars:
             pkginfo.filevars[filevar] = getpkgvar(pkg, filevar)
@@ -252,8 +268,15 @@ def write_pkghistory(pkginfo, d):
             if val:
                 f.write("%s = %s\n" % (pkgvar, val))
 
+        f.write("RPROVIDES = %s\n" %  pkginfo.rprovides)
         f.write("RDEPENDS = %s\n" %  pkginfo.rdepends)
         f.write("RRECOMMENDS = %s\n" %  pkginfo.rrecommends)
+        if pkginfo.rsuggests:
+            f.write("RSUGGESTS = %s\n" %  pkginfo.rsuggests)
+        if pkginfo.rreplaces:
+            f.write("RREPLACES = %s\n" %  pkginfo.rreplaces)
+        if pkginfo.rconflicts:
+            f.write("RCONFLICTS = %s\n" %  pkginfo.rconflicts)
         f.write("PKGSIZE = %d\n" %  pkginfo.size)
         f.write("FILES = %s\n" %  pkginfo.files)
         f.write("FILELIST = %s\n" %  pkginfo.filelist)
Signature · 1 line
1.7.10.4
#2 lore raw

PATCH 2/2 buildhistory_analysis: handle more R* variables

In reply to Paul Eggleton

Report changes to RPROVIDES, RREPLACES, and RCONFLICTS. As RSUGGESTS isn't widely used and isn't of huge concern if it changes, it is not reported by default.

Implements [YOCTO #3391].

---
 meta/lib/oe/buildhistory_analysis.py |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
meta/lib/oe/buildhistory_analysis.py +4 -4
index 7b5ee45..2306bcb 100644
@@ -17,12 +17,12 @@ import bb.utils
 
 
 # How to display fields
-list_fields = ['DEPENDS', 'RDEPENDS', 'RRECOMMENDS', 'FILES', 'FILELIST', 'USER_CLASSES', 'IMAGE_CLASSES', 'IMAGE_FEATURES', 'IMAGE_LINGUAS', 'IMAGE_INSTALL', 'BAD_RECOMMENDATIONS']
+list_fields = ['DEPENDS', 'RPROVIDES', 'RDEPENDS', 'RRECOMMENDS', 'RSUGGESTS', 'RREPLACES', 'RCONFLICTS', 'FILES', 'FILELIST', 'USER_CLASSES', 'IMAGE_CLASSES', 'IMAGE_FEATURES', 'IMAGE_LINGUAS', 'IMAGE_INSTALL', 'BAD_RECOMMENDATIONS']
 list_order_fields = ['PACKAGES']
 defaultval_fields = ['PKG', 'PKGE', 'PKGV', 'PKGR']
 numeric_fields = ['PKGSIZE', 'IMAGESIZE']
 # Fields to monitor
-monitor_fields = ['RDEPENDS', 'RRECOMMENDS', 'PACKAGES', 'FILELIST', 'PKGSIZE', 'IMAGESIZE', 'PKG', 'PKGE', 'PKGV', 'PKGR']
+monitor_fields = ['RPROVIDES', 'RDEPENDS', 'RRECOMMENDS', 'RREPLACES', 'RCONFLICTS', 'PACKAGES', 'FILELIST', 'PKGSIZE', 'IMAGESIZE', 'PKG', 'PKGE', 'PKGV', 'PKGR']
 # Percentage change to alert for numeric fields
 monitor_numeric_threshold = 10
 # Image files to monitor (note that image-info.txt is handled separately)
@@ -66,7 +66,7 @@ class ChangeRecord:
             return pkglist
 
         if self.fieldname in list_fields or self.fieldname in list_order_fields:
-            if self.fieldname in ['RDEPENDS', 'RRECOMMENDS']:
+            if self.fieldname in ['RPROVIDES', 'RDEPENDS', 'RRECOMMENDS', 'RSUGGESTS', 'RREPLACES', 'RCONFLICTS']:
                 (depvera, depverb) = compare_pkg_lists(self.oldvalue, self.newvalue)
                 aitems = pkglist_combine(depvera)
                 bitems = pkglist_combine(depverb)
@@ -328,7 +328,7 @@ def compare_dict_blobs(path, ablob, bblob, report_all):
             elif (not report_all) and key in list_fields:
                 if key == "FILELIST" and path.endswith("-dbg") and bstr.strip() != '':
                     continue
-                if key in ['RDEPENDS', 'RRECOMMENDS']:
+                if key in ['RPROVIDES', 'RDEPENDS', 'RRECOMMENDS', 'RSUGGESTS', 'RREPLACES', 'RCONFLICTS']:
                     (depvera, depverb) = compare_pkg_lists(astr, bstr)
                     if depvera == depverb:
                         continue
Signature · 1 line
1.7.10.4