diff options
author | Martin Jansa <martin.jansa@gmail.com> | 2013-08-07 00:08:08 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-08-12 13:09:50 +0100 |
commit | 560dac6e7db76f533f98eda969f585e4eb416e6e (patch) | |
tree | ed51030c00daa4f118be75927619319dd34e1027 /meta/classes/buildhistory.bbclass | |
parent | 712622e2dbfa2559b873730bd1d4d23cc827b295 (diff) | |
download | poky-560dac6e7db76f533f98eda969f585e4eb416e6e.tar.gz |
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>
Diffstat (limited to 'meta/classes/buildhistory.bbclass')
-rw-r--r-- | meta/classes/buildhistory.bbclass | 18 |
1 files changed, 9 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() { | |||
201 | # Find out what the last version was | 201 | # Find out what the last version was |
202 | # Make sure the version did not decrease | 202 | # Make sure the version did not decrease |
203 | # | 203 | # |
204 | if d.getVar("BUILDHISTORY_CHECKVERBACKWARDS", True) == "1": | 204 | lastversion = getlastpkgversion(pkg) |
205 | lastversion = getlastpkgversion(pkg) | 205 | if lastversion: |
206 | if lastversion: | 206 | last_pkge = lastversion.pkge |
207 | last_pkge = lastversion.pkge | 207 | last_pkgv = lastversion.pkgv |
208 | last_pkgv = lastversion.pkgv | 208 | last_pkgr = lastversion.pkgr |
209 | last_pkgr = lastversion.pkgr | 209 | r = bb.utils.vercmp((pkge, pkgv, pkgr), (last_pkge, last_pkgv, last_pkgr)) |
210 | r = bb.utils.vercmp((pkge, pkgv, pkgr), (last_pkge, last_pkgv, last_pkgr)) | 210 | if r < 0: |
211 | if r < 0: | 211 | 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) |
212 | 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)) | 212 | package_qa_handle_error("version-going-backwards", msg, d) |
213 | 213 | ||
214 | pkginfo = PackageInfo(pkg) | 214 | pkginfo = PackageInfo(pkg) |
215 | # Apparently the version can be different on a per-package basis (see Python) | 215 | # Apparently the version can be different on a per-package basis (see Python) |