diff options
| -rw-r--r-- | meta/classes/buildhistory.bbclass | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass index a20d03dae7..43780ad2da 100644 --- a/meta/classes/buildhistory.bbclass +++ b/meta/classes/buildhistory.bbclass | |||
| @@ -14,6 +14,7 @@ BUILDHISTORY_DIR_PACKAGE = "${BUILDHISTORY_DIR}/packages/${MULTIMACH_TARGET_SYS} | |||
| 14 | BUILDHISTORY_COMMIT ?= "0" | 14 | BUILDHISTORY_COMMIT ?= "0" |
| 15 | BUILDHISTORY_COMMIT_AUTHOR ?= "buildhistory <buildhistory@${DISTRO}>" | 15 | BUILDHISTORY_COMMIT_AUTHOR ?= "buildhistory <buildhistory@${DISTRO}>" |
| 16 | BUILDHISTORY_PUSH_REPO ?= "" | 16 | BUILDHISTORY_PUSH_REPO ?= "" |
| 17 | BUILDHISTORY_CHECKVERBACKWARDS ?= "1" | ||
| 17 | 18 | ||
| 18 | # Must inherit package first before changing PACKAGEFUNCS | 19 | # Must inherit package first before changing PACKAGEFUNCS |
| 19 | inherit package | 20 | inherit package |
| @@ -183,14 +184,15 @@ python buildhistory_emit_pkghistory() { | |||
| 183 | # Find out what the last version was | 184 | # Find out what the last version was |
| 184 | # Make sure the version did not decrease | 185 | # Make sure the version did not decrease |
| 185 | # | 186 | # |
| 186 | lastversion = getlastpkgversion(pkg) | 187 | if d.getVar("BUILDHISTORY_CHECKVERBACKWARDS", True) == "1": |
| 187 | if lastversion: | 188 | lastversion = getlastpkgversion(pkg) |
| 188 | last_pkge = lastversion.pkge | 189 | if lastversion: |
| 189 | last_pkgv = lastversion.pkgv | 190 | last_pkge = lastversion.pkge |
| 190 | last_pkgr = lastversion.pkgr | 191 | last_pkgv = lastversion.pkgv |
| 191 | r = bb.utils.vercmp((pkge, pkgv, pkgr), (last_pkge, last_pkgv, last_pkgr)) | 192 | last_pkgr = lastversion.pkgr |
| 192 | if r < 0: | 193 | r = bb.utils.vercmp((pkge, pkgv, pkgr), (last_pkge, last_pkgv, last_pkgr)) |
| 193 | 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)) | 194 | if r < 0: |
| 195 | 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)) | ||
| 194 | 196 | ||
| 195 | pkginfo = PackageInfo(pkg) | 197 | pkginfo = PackageInfo(pkg) |
| 196 | # Apparently the version can be different on a per-package basis (see Python) | 198 | # Apparently the version can be different on a per-package basis (see Python) |
