diff options
author | Martin Jansa <martin.jansa@gmail.com> | 2013-08-07 00:08:08 +0200 |
---|---|---|
committer | Saul Wold <sgw@linux.intel.com> | 2013-08-09 07:55:09 -0700 |
commit | 44624853de8c88abdcae2ccd0902b390ff546d4c (patch) | |
tree | 70f1a87144354c6822d766e3ff5b5191a87f7722 /meta/classes | |
parent | 291ab168fac15eae0e4c9234e16f394b0e1547a0 (diff) | |
download | openembedded-core-44624853de8c88abdcae2ccd0902b390ff546d4c.tar.gz openembedded-core-44624853de8c88abdcae2ccd0902b390ff546d4c.tar.bz2 openembedded-core-44624853de8c88abdcae2ccd0902b390ff546d4c.zip |
buildhistory: use package_qa_handle_error for version-going-backwards
* this way it's easier for distro to select if such issue should be
error, warning or ignored and also it gets recorded in qa.log
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/buildhistory.bbclass | 18 | ||||
-rw-r--r-- | meta/classes/insane.bbclass | 1 |
2 files changed, 10 insertions, 9 deletions
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass index c5bba25fd5..55b6bbf496 100644 --- a/meta/classes/buildhistory.bbclass +++ b/meta/classes/buildhistory.bbclass @@ -201,15 +201,15 @@ python buildhistory_emit_pkghistory() { # Find out what the last version was # Make sure the version did not decrease # - if d.getVar("BUILDHISTORY_CHECKVERBACKWARDS", True) == "1": - lastversion = getlastpkgversion(pkg) - if lastversion: - last_pkge = lastversion.pkge - last_pkgv = lastversion.pkgv - last_pkgr = lastversion.pkgr - r = bb.utils.vercmp((pkge, pkgv, pkgr), (last_pkge, last_pkgv, last_pkgr)) - if r < 0: - bb.error("Package version for package %s went backwards which would break package feeds from (%s:%s-%s to %s:%s-%s)" % (pkg, last_pkge, last_pkgv, last_pkgr, pkge, pkgv, pkgr)) + lastversion = getlastpkgversion(pkg) + if lastversion: + last_pkge = lastversion.pkge + last_pkgv = lastversion.pkgv + last_pkgr = lastversion.pkgr + r = bb.utils.vercmp((pkge, pkgv, pkgr), (last_pkge, last_pkgv, last_pkgr)) + if r < 0: + msg = "Package version for package %s went backwards which would break package feeds from (%s:%s-%s to %s:%s-%s)" % (pkg, last_pkge, last_pkgv, last_pkgr, pkge, pkgv, pkgr) + package_qa_handle_error("version-going-backwards", msg, d) pkginfo = PackageInfo(pkg) # Apparently the version can be different on a per-package basis (see Python) diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index 75bd2e2b22..aa02985f8d 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass @@ -37,6 +37,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 \ " ALL_QA = "${WARN_QA} ${ERROR_QA}" |