summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2011-12-05 18:28:12 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-12-05 22:47:06 (GMT)
commit4eaa9ffa3f934615dc18580640c74b3e51f93e17 (patch)
tree835718fae11d63f95d285685cc0402389ccd7af9
parent4c9906c839c199a06605996736b108655c3a8bb5 (diff)
downloadpoky-4eaa9ffa3f934615dc18580640c74b3e51f93e17.tar.gz
classes/buildhistory: do not save old packagehistory files by default
Disable storing package history as version named files unless BUILDHISTORY_KEEP_VERSIONS is set to 1; otherwise the adds of these files that duplicate what is already in git anyway is just noise in the git log. (From OE-Core rev: fd2581770b8e4c42aa88f244daca58e27e11dff9) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/buildhistory.bbclass9
1 files changed, 7 insertions, 2 deletions
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index 1859961..e4534e9 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -258,8 +258,13 @@ def write_latestlink(pkg, pe, pv, pr, d):
258 filedir = os.path.join(pkghistdir, pkg) 258 filedir = os.path.join(pkghistdir, pkg)
259 else: 259 else:
260 filedir = pkghistdir 260 filedir = pkghistdir
261 rm_link(os.path.join(filedir, "latest")) 261 latest_file = os.path.join(filedir, "latest")
262 shutil.copy(os.path.join(filedir, "%s:%s-%s" % (pe, pv, pr)), os.path.join(filedir, "latest")) 262 ver_file = os.path.join(filedir, "%s:%s-%s" % (pe, pv, pr))
263 rm_link(latest_file)
264 if d.getVar('BUILDHISTORY_KEEP_VERSIONS', True) == '1':
265 shutil.copy(ver_file, latest_file)
266 else:
267 shutil.move(ver_file, latest_file)
263 268
264 269
265buildhistory_get_image_installed() { 270buildhistory_get_image_installed() {