From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: openembedded-core <openembedded-core@lists.openembedded.org>
Cc: "Eggleton, Paul" <paul.eggleton@intel.com>
Subject: [PATCH] buildhistory: Allow the version backwards check to be disabled
Date: Sun, 03 Mar 2013 13:07:18 +0000 [thread overview]
Message-ID: <1362316038.4325.4.camel@ted> (raw)
When the PR service is not enabled, the versions can go backwards and there
are cases we don't want to know about this. This patch adds a variable
allowing these checks to be turned off whilst still using buildhistory.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index a20d03d..43780ad 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -14,6 +14,7 @@ BUILDHISTORY_DIR_PACKAGE = "${BUILDHISTORY_DIR}/packages/${MULTIMACH_TARGET_SYS}
BUILDHISTORY_COMMIT ?= "0"
BUILDHISTORY_COMMIT_AUTHOR ?= "buildhistory <buildhistory@${DISTRO}>"
BUILDHISTORY_PUSH_REPO ?= ""
+BUILDHISTORY_CHECKVERBACKWARDS ?= "1"
# Must inherit package first before changing PACKAGEFUNCS
inherit package
@@ -183,14 +184,15 @@ python buildhistory_emit_pkghistory() {
# Find out what the last version was
# Make sure the version did not decrease
#
- 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))
+ 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))
pkginfo = PackageInfo(pkg)
# Apparently the version can be different on a per-package basis (see Python)
reply other threads:[~2013-03-03 13:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1362316038.4325.4.camel@ted \
--to=richard.purdie@linuxfoundation.org \
--cc=openembedded-core@lists.openembedded.org \
--cc=paul.eggleton@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox