diff options
Diffstat (limited to 'meta/classes/buildhistory.bbclass')
-rw-r--r-- | meta/classes/buildhistory.bbclass | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass index 1859961012..e4534e9fbe 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 | ||
265 | buildhistory_get_image_installed() { | 270 | buildhistory_get_image_installed() { |