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 (From OE-Core rev: 44624853de8c88abdcae2ccd0902b390ff546d4c) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
712622e2db
commit
560dac6e7d
|
@ -201,15 +201,15 @@ python buildhistory_emit_pkghistory() {
|
||||||
# Find out what the last version was
|
# Find out what the last version was
|
||||||
# Make sure the version did not decrease
|
# Make sure the version did not decrease
|
||||||
#
|
#
|
||||||
if d.getVar("BUILDHISTORY_CHECKVERBACKWARDS", True) == "1":
|
lastversion = getlastpkgversion(pkg)
|
||||||
lastversion = getlastpkgversion(pkg)
|
if lastversion:
|
||||||
if lastversion:
|
last_pkge = lastversion.pkge
|
||||||
last_pkge = lastversion.pkge
|
last_pkgv = lastversion.pkgv
|
||||||
last_pkgv = lastversion.pkgv
|
last_pkgr = lastversion.pkgr
|
||||||
last_pkgr = lastversion.pkgr
|
r = bb.utils.vercmp((pkge, pkgv, pkgr), (last_pkge, last_pkgv, last_pkgr))
|
||||||
r = bb.utils.vercmp((pkge, pkgv, pkgr), (last_pkge, last_pkgv, last_pkgr))
|
if r < 0:
|
||||||
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)
|
||||||
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))
|
package_qa_handle_error("version-going-backwards", msg, d)
|
||||||
|
|
||||||
pkginfo = PackageInfo(pkg)
|
pkginfo = PackageInfo(pkg)
|
||||||
# Apparently the version can be different on a per-package basis (see Python)
|
# Apparently the version can be different on a per-package basis (see Python)
|
||||||
|
|
|
@ -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 \
|
ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \
|
||||||
perms dep-cmp pkgvarcheck perm-config perm-line perm-link \
|
perms dep-cmp pkgvarcheck perm-config perm-line perm-link \
|
||||||
split-strip packages-list pkgv-undefined var-undefined \
|
split-strip packages-list pkgv-undefined var-undefined \
|
||||||
|
version-going-backwards \
|
||||||
"
|
"
|
||||||
|
|
||||||
ALL_QA = "${WARN_QA} ${ERROR_QA}"
|
ALL_QA = "${WARN_QA} ${ERROR_QA}"
|
||||||
|
|
Loading…
Reference in New Issue