public inbox for cygwin-apps-cvs@sourceware.org
help / color / mirror / Atom feed
From: jturney@sourceware.org
To: cygwin-apps-cvs@sourceware.org
Subject: [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20171008-10-gbb18b84
Date: Mon, 06 Nov 2017 14:08:00 -0000	[thread overview]
Message-ID: <20171106140846.130636.qmail@sourceware.org> (raw)




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

commit bb18b8449ae04431c1b88e53e08a3491c031e67a
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Sun Nov 5 20:07:10 2017 +0000

    Fix test: stability level not being set correctly, when less than curr:
    
    When using a test: label in version hints (rather than specifying a test:
    version in override.hint), the test: stability level wasn't being assigned
    correctly, if it was a lower version than curr:

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

commit f24cdc3b76929626ea2e6dfe3b8c94744672ab0a
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Sun Nov 5 19:43:31 2017 +0000

    Remove some unneeded parts of previous commit


Diff:
---
 calm/package.py |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/calm/package.py b/calm/package.py
index 610671a..fc0d7f4 100755
--- a/calm/package.py
+++ b/calm/package.py
@@ -25,7 +25,7 @@
 # utilities for working with a package database
 #
 
-from collections import defaultdict, OrderedDict
+from collections import defaultdict
 import copy
 import difflib
 import hashlib
@@ -551,6 +551,14 @@ def validate_packages(args, packages):
                 if packages[p].override_hints[l] is not None:
                     packages[p].stability[l] = packages[p].override_hints[l]
 
+        l = 'test'
+        if l not in packages[p].stability:
+            for v in sorted(packages[p].vermap.keys(), key=lambda v: SetupVersion(v), reverse=True):
+                if 'test' in packages[p].version_hints[v]:
+                    packages[p].stability[l] = v
+                    packages[p].version_hints[v][l] = ''
+                    break
+
         # the package must have some versions
         if not packages[p].stability:
             logging.error("no versions at any stability level for package '%s'" % (p))
@@ -797,7 +805,7 @@ def write_setup_ini(args, packages, arch):
             # next put any other versions
             #
             # these [prev] or [test] sections are superseded by the final ones.
-            for i, version in enumerate(sorted(packages[p].vermap.keys(), key=lambda v: SetupVersion(v), reverse=True)):
+            for version in sorted(packages[p].vermap.keys(), key=lambda v: SetupVersion(v), reverse=True):
                 # ignore versions which should have been removed by stale
                 # package removal
                 if not (set(['install', 'source']) & set(packages[p].vermap[version])):


                 reply	other threads:[~2017-11-06 14:08 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=20171106140846.130636.qmail@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).