From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2201) id D84433857816; Sun, 11 Apr 2021 14:36:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D84433857816 To: cygwin-apps-cvs@sourceware.org Subject: [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20210408-1-g74f9536 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 81aad90cd41f71d977dacff400d260c407800a02 X-Git-Newrev: 74f9536819ef4a4116e710d35b452b7f78e21247 Message-Id: <20210411143627.D84433857816@sourceware.org> Date: Sun, 11 Apr 2021 14:36:27 +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: Sun, 11 Apr 2021 14:36:28 -0000 https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=74f9536819ef4a4116e710d35b452b7f78e21247 commit 74f9536819ef4a4116e710d35b452b7f78e21247 Author: Jon Turney Date: Tue Mar 16 13:17:46 2021 +0000 Update perl annotation tool The default perl annotation is now 5_032. Use 5_26 annotation. This makes existing packages which depend on perl 5.26 uninstallable, as nothing provides: perl5_026. Diff: --- calm/fix-annotate-perl-hint.py | 17 +++++++++++++---- calm/package.py | 2 +- calm/past_mistakes.py | 5 +++++ 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/calm/fix-annotate-perl-hint.py b/calm/fix-annotate-perl-hint.py index 41ab770..126dd51 100644 --- a/calm/fix-annotate-perl-hint.py +++ b/calm/fix-annotate-perl-hint.py @@ -63,17 +63,26 @@ def fix_one_hint(dirpath, hintfile, tf): modified = False - # if no annotation yet, add a perl annotation + # if no annotation yet ... if 'notes' not in hints: requires = hints.get('requires', '').split() if requires: + # is a perl provide is already present in requires? + if any(r.startswith('perl5_') for r in requires): + return + + # ... otherwise, add a perl annotation if ('perl_base' in requires) or ('perl' in requires): logging.info("%s has perl in requires and no annotations" % (hintfile)) - hints['notes'] = 'perl5_030' + hints['notes'] = 'perl5_032' modified = True + # fix spelling mistake in 5_26 annotation + if hints.get('notes', '') == 'perl5_26': + hints['notes'] = 'perl5_026' + # if annotated, check if this package installs into vendor_perl, and if so, - # add the annotate perl version to requires, if not already present + # add the annotated perl version to requires, if not already present if hints.get('notes', '').startswith('perl5_0'): ivp = False exe = False @@ -93,7 +102,7 @@ def fix_one_hint(dirpath, hintfile, tf): requires.append(hints['notes']) requires = sorted(requires) modified = True - logging.warning("adding perl provide to requires in %s" % (hintfile)) + logging.warning("adding %s to requires in %s" % (hints['notes'], hintfile)) hints['requires'] = ' '.join(requires) else: if exe: diff --git a/calm/package.py b/calm/package.py index b28907a..ea41b1f 100755 --- a/calm/package.py +++ b/calm/package.py @@ -525,7 +525,7 @@ def validate_packages(args, packages): # all packages listed in a hint must exist (unless the # disable-check option says that's ok) - if r not in valid_requires: + if (r not in valid_requires) and (r not in past_mistakes.nonexistent_provides): if okmissing not in getattr(args, 'disable_check', []): logging.error("package '%s' version '%s' %s: '%s', but nothing satisfies that" % (p, v, c, r)) error = True diff --git a/calm/past_mistakes.py b/calm/past_mistakes.py index 627411b..d8f2084 100644 --- a/calm/past_mistakes.py +++ b/calm/past_mistakes.py @@ -190,3 +190,8 @@ maint_anomalies = { 'python-debuginfo': ['2.7.12-1'], # should be obsoleted by python2(-debuginfo) 'transfig-debuginfo': ['3.2.5e-2'], # should be obsoleted by xfig(-debuginfo) } + +# provides: which don't exist +nonexistent_provides = [ + 'perl5_026', +]