From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2201) id 3DDFC383E80F; Mon, 25 May 2020 17:00:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3DDFC383E80F To: cygwin-apps-cvs@sourceware.org Subject: [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20200401-27-g6d92f86 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: fb3a4d3cb501a22b3d55165fc3d6fd222ae47c51 X-Git-Newrev: 6d92f86649c1bc385949fda0ad74bb644d80fc65 Message-Id: <20200525170045.3DDFC383E80F@sourceware.org> Date: Mon, 25 May 2020 17:00:45 +0000 (GMT) From: Jon TURNEY X-BeenThere: cygwin-apps-cvs@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin-apps git logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 May 2020 17:00:45 -0000 https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=6d92f86649c1bc385949fda0ad74bb644d80fc65 commit 6d92f86649c1bc385949fda0ad74bb644d80fc65 Author: Jon Turney Date: Mon May 25 16:28:59 2020 +0100 Ignore versions overriden by version: when checking if a hint is stale When uploading a replacement hint with a version: override, the overriden version doesn't exist anymore, so the hint will be considered stale and removed. This causes the upload to fail as movelist validation notices that the hint is both uploaded and automatically vaulted. Diff: --- calm/package.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/calm/package.py b/calm/package.py index 487c3ed..b789f44 100755 --- a/calm/package.py +++ b/calm/package.py @@ -394,6 +394,8 @@ def read_one_package(packages, p, relpath, dirpath, files, remove, kind): # apply a version override if 'version' in pvr_hint: ovr = pvr_hint['version'] + # also record the version before the override + pvr_hint['original-version'] = vr else: ovr = vr @@ -1409,7 +1411,14 @@ def stale_packages(packages): else: all_stale[v] = False + # skip over any versions which have a version: override + effective_versions = list(po.hints.keys()) for v in po.hints: + ov = po.hints[v].hints.get('original-version', v) + if ov != v and ov in effective_versions: + effective_versions.remove(ov) + + for v in effective_versions: # if there's a pvr.hint without a fresh source or install of the # same version, move it as well if all_stale.get(v, True):