public inbox for cygwin-apps-cvs@sourceware.org
help / color / mirror / Atom feed
* [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20210408-1-g74f9536
@ 2021-04-11 14:36 Jon TURNEY
  0 siblings, 0 replies; only message in thread
From: Jon TURNEY @ 2021-04-11 14:36 UTC (permalink / raw)
  To: cygwin-apps-cvs




https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=74f9536819ef4a4116e710d35b452b7f78e21247

commit 74f9536819ef4a4116e710d35b452b7f78e21247
Author: Jon Turney <jon.turney@dronecode.org.uk>
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',
+]



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-11 14:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-11 14:36 [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20210408-1-g74f9536 Jon TURNEY

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).