Skip to contentSkip to conversation

Fixes for denzil-next

PATCH New Paul Eggleton 1 participant 5 messages Aug 10, 2012

lore
Share & tools
lore
#0 lore raw

cover Fixes for denzil-next

Some cherry-picks from master to fix bugs in denzil.

The following changes since commit 741146fa90f28f7ce8d82ee7f7e254872d519724:

gconf.bbclass: don't register schemas in the install stage (2012-06-29 15:03:01 +0100)

are available in the git repository at:

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

Paul Eggleton (4):
classes/rootfs_*: fix splitting package dependency strings
buildhistory_analysis: fix error when version specifier missing scripts/buildhistory-diff: add GitPython version check classes/license: fix manifest to work with deb

 meta/classes/license.bbclass         |    2 +-
 meta/classes/rootfs_deb.bbclass      |    4 ++--
 meta/classes/rootfs_ipk.bbclass      |    4 ++--
 meta/lib/oe/buildhistory_analysis.py |    2 +-
 scripts/buildhistory-diff            |    8 ++++++--
 5 files changed, 12 insertions(+), 8 deletions(-)
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/4 classes/rootfs_*: fix splitting package dependency strings

If a + character appears in a version specification within the list of package dependencies, the version will not be removed from the list in list_package_depends/recommends leading to garbage appearing in the dependency graphs generated by buildhistory. To avoid any future problems due to unusual characters appearing in versions, change the regex to match almost any character.

Fixes [YOCTO #2451].

(From OE-Core rev: 36d1717e2ad4ca1620ee9f01b524b5ff2f499b26)

---
 meta/classes/rootfs_deb.bbclass |    4 ++--
 meta/classes/rootfs_ipk.bbclass |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
meta/classes/rootfs_deb.bbclass +2 -2
index b6c706c..6c9767f 100644
@@ -101,11 +101,11 @@ get_package_filename() {
 }
 
 list_package_depends() {
-	${DPKG_QUERY_COMMAND} -s $1 | grep ^Depends | sed -e 's/^Depends: //' -e 's/,//g' -e 's:([=<>]* [0-9a-zA-Z.~\-]*)::g'
+	${DPKG_QUERY_COMMAND} -s $1 | grep ^Depends | sed -e 's/^Depends: //' -e 's/,//g' -e 's:([=<>]* [^ )]*)::g'
 }
 
 list_package_recommends() {
-	${DPKG_QUERY_COMMAND} -s $1 | grep ^Recommends | sed -e 's/^Recommends: //' -e 's/,//g' -e 's:([=<>]* [0-9a-zA-Z.~\-]*)::g'
+	${DPKG_QUERY_COMMAND} -s $1 | grep ^Recommends | sed -e 's/^Recommends: //' -e 's/,//g' -e 's:([=<>]* [^ )]*)::g'
 }
 
 rootfs_check_package_exists() {
meta/classes/rootfs_ipk.bbclass +2 -2
index cbc63f0..1580086 100644
@@ -143,11 +143,11 @@ get_package_filename() {
 }
 
 list_package_depends() {
-	opkg-cl ${IPKG_ARGS} info $1 | grep ^Depends | sed -e 's/^Depends: //' -e 's/,//g' -e 's:([=<>]* [0-9a-zA-Z.~\-]*)::g'
+	opkg-cl ${IPKG_ARGS} info $1 | grep ^Depends | sed -e 's/^Depends: //' -e 's/,//g' -e 's:([=<>]* [^ )]*)::g'
 }
 
 list_package_recommends() {
-	opkg-cl ${IPKG_ARGS} info $1 | grep ^Recommends | sed -e 's/^Recommends: //' -e 's/,//g' -e 's:([=<>]* [0-9a-zA-Z.~\-]*)::g'
+	opkg-cl ${IPKG_ARGS} info $1 | grep ^Recommends | sed -e 's/^Recommends: //' -e 's/,//g' -e 's:([=<>]* [^ )]*)::g'
 }
 
 rootfs_check_package_exists() {
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH 2/4 buildhistory_analysis: fix error when version specifier missing

In reply to Paul Eggleton

Passing None to split_versions() will raise an exception, so check that the version is specified before passing it in.

---
 meta/lib/oe/buildhistory_analysis.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oe/buildhistory_analysis.py +1 -1
index 313416c..29dc4a9 100644
@@ -272,7 +272,7 @@ def compare_pkg_lists(astr, bstr):
         if k in depverb:
             dva = depvera[k]
             dvb = depverb[k]
-            if dva != dvb:
+            if dva and dvb and dva != dvb:
                 if bb.utils.vercmp(split_version(dva), split_version(dvb)) < 0:
                     remove.append(k)
 
Signature · 1 line
1.7.9.5
#3 lore raw

PATCH 3/4 scripts/buildhistory-diff: add GitPython version check

In reply to Paul Eggleton

Display an error if the user does not have at least version 0.3.1 of GitPython installed.

---
 scripts/buildhistory-diff |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
scripts/buildhistory-diff +6 -2
index 9936a4b..3f27eab 100755
@@ -7,16 +7,20 @@
 
 import sys
 import os
+from distutils.version import LooseVersion
 
 # Ensure PythonGit is installed (buildhistory_analysis needs it)
 try:
     import git
 except ImportError:
-    print("Please install PythonGit 0.3.1 or later in order to use this script")
+    print("Please install GitPython (python-git) 0.3.1 or later in order to use this script")
     sys.exit(1)
 
-
 def main():
+    if LooseVersion(git.__version__) < '0.3.1':
+        print("Version of GitPython is too old, please install GitPython (python-git) 0.3.1 or later in order to use this script")
+        sys.exit(1)
+
     if (len(sys.argv) < 3):
         print("Report significant differences in the buildhistory repository")
         print("Syntax: %s <buildhistory-path> <since-revision> [to-revision]" % os.path.basename(sys.argv[0]))
Signature · 1 line
1.7.9.5
#4 lore raw

PATCH 4/4 classes/license: fix manifest to work with deb

In reply to Paul Eggleton

Prepend the license manifest creation call to ROOTFS_POSTPROCESS_COMMAND instead of appending to ROOTFS_POSTINSTALL_COMMAND. The latter is not implemented for the deb backend (and probably ought to just be removed completely), and by using _prepend we can still ensure it occurs before package info is removed (and before buildhistory in case it is needed there in future).

(From OE-Core rev: 56fafe083fdb63f156a081344fb1d836e3182bf0)

---
 meta/classes/license.bbclass |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/license.bbclass +1 -1
index 6c4a673..cd4512e 100644
@@ -382,7 +382,7 @@ do_populate_lic[sstate-name] = "populate-lic"
 do_populate_lic[sstate-inputdirs] = "${LICSSTATEDIR}"
 do_populate_lic[sstate-outputdirs] = "${LICENSE_DIRECTORY}/"
 
-ROOTFS_POSTINSTALL_COMMAND += "license_create_manifest; "
+ROOTFS_POSTPROCESS_COMMAND_prepend = "license_create_manifest; "
 
 python do_populate_lic_setscene () {
 	sstate_setscene(d)
Signature · 1 line
1.7.9.5