From: Gordon Hecker Date: Wed, 5 May 2010 13:10:40 +0000 (+0200) Subject: deployment: do not re-deploy releases that are already in archive X-Git-Tag: e2factory-2.3.6~10 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=20de93f7f11424f1b840ace2cf2589a93a031984;p=e2factory.git deployment: do not re-deploy releases that are already in archive Signed-off-by: Gordon Hecker --- diff --git a/local/e2build.lua b/local/e2build.lua index 9d9e422..7f9e12d 100644 --- a/local/e2build.lua +++ b/local/e2build.lua @@ -1244,6 +1244,19 @@ function deploy(info, r, return_flags) table.insert(files, "checksums") local server, location = res.build_mode.deploy_storage(info.project_location, info.release_id) + + -- do not re-deploy if this release was already done earlier + local location1 = string.format("%s/%s/checksums", location, r) + local cache_flags = { + cache = false, + } + rc, re = info.cache:fetch_file(server, location1, ".", nil, cache_flags) + if rc then + e2lib.warnf("WOTHER", + "Skipping deployment. This release was already deployed.") + return true + end + e2lib.logf(1, "deploying %s to %s:%s", r, server, location) for _,f in ipairs(files) do local sourcefile = string.format("result/%s", f)