From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 130818 invoked by alias); 1 Jul 2019 16:46:59 -0000 Mailing-List: contact cygwin-apps-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cygwin-apps-cvs-owner@sourceware.org Received: (qmail 130783 invoked by uid 9795); 1 Jul 2019 16:46:59 -0000 Date: Mon, 01 Jul 2019 16:46:00 -0000 Message-ID: <20190701164659.130772.qmail@sourceware.org> From: jturney@sourceware.org To: cygwin-apps-cvs@sourceware.org Subject: [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20190530-33-gd75abce X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: f92ad1d5c292ed54e7a62f5c52280efab8267f37 X-Git-Newrev: d75abceedb46749982669236c5c102796a1fbfb1 X-SW-Source: 2019-q3/txt/msg00000.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=d75abceedb46749982669236c5c102796a1fbfb1 commit d75abceedb46749982669236c5c102796a1fbfb1 Author: Jon Turney Date: Sun Apr 28 19:32:17 2019 +0100 Don't depend on an obsoleting package Diff: --- calm/package.py | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/calm/package.py b/calm/package.py index 008d01c..4ce1660 100755 --- a/calm/package.py +++ b/calm/package.py @@ -464,6 +464,27 @@ def validate_packages(args, packages): logging.error("package '%s' version '%s' refers to nonexistent or errored external-source '%s'" % (p, v, e)) error = True + # If package A is obsoleted by package B, B should appear in the + # requires: for A (so the upgrade occurs with pre-depends: aware + # versions of setup), but not in the depends: for A (as that creates an + # unsatisfiable dependency when explicitly installing A with lisolv + # versions of setup, which should just install B). This condition can + # occur since we might have synthesized the depends: from the requires: + # in read_hints(), so fix that up here. + for (v, hints) in packages[p].version_hints.items(): + obsoletes = hints.get('obsoletes', '') + if obsoletes: + for o in obsoletes.split(','): + o = o.strip() + o = re.sub(r'(.*) +\(.*\)', r'\1', o) + + for (ov, ohints) in packages[o].version_hints.items(): + if 'depends' in ohints: + depends = ohints['depends'].split(',') + depends = [d for d in depends if d != p] + packages[o].version_hints[ov]['depends'] = ','.join(depends) + logging.debug("removed obsoleting '%s' from the depends: of package '%s'" % (p, o)) + packages[p].vermap = defaultdict(defaultdict) is_empty = {} has_install = False