public inbox for cygwin-apps-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jon TURNEY <jturney@sourceware.org>
To: cygwin-apps-cvs@sourceware.org
Subject: [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20210408-1-g74f9536
Date: Sun, 11 Apr 2021 14:36:27 +0000 (GMT)	[thread overview]
Message-ID: <20210411143627.D84433857816@sourceware.org> (raw)




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',
+]



                 reply	other threads:[~2021-04-11 14:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210411143627.D84433857816@sourceware.org \
    --to=jturney@sourceware.org \
    --cc=cygwin-apps-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).