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. 20180131-7-gbc383cb
Date: Tue, 20 Feb 2018 15:44:00 -0000	[thread overview]
Message-ID: <20180220154414.10407.qmail@sourceware.org> (raw)




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

commit bc383cb62deaa19520aaf6816c607b0510a751eb
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Tue Feb 20 13:14:28 2018 +0000

    Properly generate an empty depends2: when needed

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

commit 3691f731db4121d9db07aa3a69c90e6000895eae
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Tue Feb 20 13:04:33 2018 +0000

    Tolerate comma or space separated obsoletes: in hints


Diff:
---
 calm/hint.py                                       |    6 +++++-
 calm/package.py                                    |    2 +-
 .../noarch/release/test-c/test-c-1.0-1.hint        |    2 +-
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/calm/hint.py b/calm/hint.py
index 98386ef..f5d7419 100755
--- a/calm/hint.py
+++ b/calm/hint.py
@@ -318,7 +318,11 @@ def hint_file_parse(fn, kind):
                 hints['depends'] = split_trim_sort_join(hints['depends'], ',')
 
             if 'obsoletes' in hints:
-                hints['obsoletes'] = split_trim_sort_join(hints['obsoletes'], ',')
+                # obsoletes is specified as comma separated, but cygport writes it space separated at the moment...
+                if ',' in hints['obsoletes']:
+                    hints['obsoletes'] = split_trim_sort_join(hints['obsoletes'], ',')
+                else:
+                    hints['obsoletes'] = split_trim_sort_join(hints['obsoletes'], None, ', ')
 
             if 'replace-versions' in hints:
                 hints['replace-versions'] = split_trim_sort_join(hints['replace-versions'], None, ' ')
diff --git a/calm/package.py b/calm/package.py
index 8c45dc0..e54ed25 100755
--- a/calm/package.py
+++ b/calm/package.py
@@ -956,7 +956,7 @@ def write_setup_ini(args, packages, arch):
                             logging.warning("package '%s' version '%s' has no source in external-source '%s'" % (p, version, s))
 
                 if packages[p].version_hints[version].get('depends', '') or requires:
-                    print("depends2: %s" % packages[p].version_hints[version]['depends'], file=f)
+                    print("depends2: %s" % packages[p].version_hints[version].get('depends', ''), file=f)
 
                 if packages[p].version_hints[version].get('obsoletes', ''):
                     print("obsoletes: %s" % packages[p].version_hints[version]['obsoletes'], file=f)
diff --git a/test/testdata/relarea/noarch/release/test-c/test-c-1.0-1.hint b/test/testdata/relarea/noarch/release/test-c/test-c-1.0-1.hint
index 9db4f40..4610d7a 100755
--- a/test/testdata/relarea/noarch/release/test-c/test-c-1.0-1.hint
+++ b/test/testdata/relarea/noarch/release/test-c/test-c-1.0-1.hint
@@ -1,4 +1,4 @@
 category: Devel
 sdesc: "test package C"
-obsoletes: obs-a, obs-b
+obsoletes: obs-a obs-b
 depends: test-d (>= 1.0), test-e


                 reply	other threads:[~2018-02-20 15:44 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=20180220154414.10407.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).