[calm - Cygwin server-side packaging maintenance script] branch master, updated. 20171204-13-g7422f60

jturney@sourceware.org jturney@sourceware.org
Sun Jan 28 14:29:00 GMT 2018




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

commit 7422f60f16f6d9182bc172cd68e958b1f9d0f615
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Thu Jan 25 21:08:19 2018 +0000

    Avoid exceptions following curr: selecting a non-existent version

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

commit ba59c8e0ce0aebc933aa0e51724d6e8f6e2f1378
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Tue Jan 23 15:46:09 2018 +0000

    Don't terminate with an exception after an invalid override.hint

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

commit 730c7eebef23c43e30542da192b9616f1062a0c5
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Tue Jan 23 13:33:39 2018 +0000

    Add a replace-versions: key in override.hint to list versions which should always be replaced
    
    This is intended for (temporarily) dealing with anomalous versions e.g.
    those which have been removed (or relabelled as test), without a
    superseding higher version existing, and indicates to setup that the named
    versions(s), if installed, should be replaced with different version.
    
    Also warn if this key pointlessly lists versions which will be replaced by
    the current version anyhow.

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

commit c7933435cc2da9e6ac9cc6f10cc0ca7ed48949ed
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Mon Jan 22 17:27:15 2018 +0000

    Run flake8, as well

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

commit 2195b7aaff01701f258792b9ffe6eafbc3734217
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Mon Jan 22 17:20:47 2018 +0000

    Run pep8 on setup.py as well

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

commit 2c01547b2f7e986903a70dbd05426d137a3d4a43
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Mon Jan 22 17:18:06 2018 +0000

    Fix running pep8 on test/

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

commit acc487641ad58c62691844afa2cdc7677093086d
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Mon Jan 22 17:17:17 2018 +0000

    Remove some unused imports

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

commit cf12bef544ac06051abe9a4a259cc95ea337504e
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Fri Jan 19 20:10:50 2018 +0000

    Rename depends: to depends2:
    
    depends: lines are recognized, but not handled correctly by setup versions
    2.880 to 2.884 (they are ignored by setup version 2.879 and prior).

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

commit d9c7afb936325431c13557f5845518dae7519a4c
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Mon Nov 20 12:24:55 2017 +0000

    Generate depends: from requires:, if not present
    
    ... and vice versa
    
    Also, fix check that depends: packages exist to handle empty depends: (and
    similarly for obsoletes:)


Diff:
---
 .travis.yml                                   |    2 +-
 calm/hint.py                                  |    4 +++
 calm/maintainers.py                           |    1 -
 calm/mkgitoliteconf.py                        |    2 -
 calm/package.py                               |   32 ++++++++++++++++++++++--
 calm/pkg2html.py                              |    1 -
 calm/spelling.py                              |    3 +-
 pep8                                          |    4 ++-
 setup.py                                      |    3 +-
 test/__init__.py                              |    3 +-
 test/test_calm.py                             |    7 +++--
 test/testdata/inifile/setup.ini.expected      |   16 +++++++++++-
 test/testdata/process_arch/setup.ini.expected |   18 +++++++++++++-
 test/testdata/uploads/pkglist.expected        |    3 +-
 14 files changed, 79 insertions(+), 20 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index e54b58a..3acab0f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,7 +3,7 @@ sudo: false
 python:
  - "3.4"
  - "3.6"
-install: "pip install pycodestyle dirq"
+install: "pip install pycodestyle flake8 dirq"
 script:
  - ./pep8
  - python -m unittest discover
diff --git a/calm/hint.py b/calm/hint.py
index 7e30913..98386ef 100755
--- a/calm/hint.py
+++ b/calm/hint.py
@@ -68,6 +68,7 @@ overridekeys = {
     'keep-count': 'val',
     'keep-days': 'val',
     'disable-check': 'val',
+    'replace-versions': 'val',
 }
 
 hintkeys = {}
@@ -319,6 +320,9 @@ def hint_file_parse(fn, kind):
             if 'obsoletes' in hints:
                 hints['obsoletes'] = split_trim_sort_join(hints['obsoletes'], ',')
 
+            if 'replace-versions' in hints:
+                hints['replace-versions'] = split_trim_sort_join(hints['replace-versions'], None, ' ')
+
         except UnicodeDecodeError:
             errors.append('invalid UTF-8')
 
diff --git a/calm/maintainers.py b/calm/maintainers.py
index 119c8b5..740f61d 100644
--- a/calm/maintainers.py
+++ b/calm/maintainers.py
@@ -39,7 +39,6 @@ import itertools
 import logging
 import os
 import re
-import sys
 
 #
 #
diff --git a/calm/mkgitoliteconf.py b/calm/mkgitoliteconf.py
index bf243e6..42508b1 100755
--- a/calm/mkgitoliteconf.py
+++ b/calm/mkgitoliteconf.py
@@ -27,8 +27,6 @@
 
 from collections import defaultdict
 import argparse
-import logging
-import os
 import sys
 
 from . import common_constants
diff --git a/calm/package.py b/calm/package.py
index 1d808bf..ee3a377 100755
--- a/calm/package.py
+++ b/calm/package.py
@@ -125,6 +125,13 @@ def read_hints(p, fn, kind):
         for l in hints['parse-warnings']:
             logging.info("package '%s': %s" % (p, l))
 
+    # if we don't have both requires: and depends:, generate the one
+    # from the other
+    if ('requires' in hints) and ('depends' not in hints):
+        hints['depends'] = ', '.join(hints['requires'].split())
+    elif ('depends' in hints) and ('requires' not in hints):
+        hints['requires'] = ' '.join([re.sub(r'(.*)\s+\(.*\)', r'\1', d) for d in hints['depends'].split(',')])
+
     return hints
 
 
@@ -191,6 +198,8 @@ def read_package(packages, basedir, dirpath, files, strict=False, remove=[], upl
         if 'override.hint' in files:
             # read override.hint
             override_hints = read_hints(p, os.path.join(dirpath, 'override.hint'), hint.override)
+            if not override_hints:
+                return True
             files.remove('override.hint')
         else:
             override_hints = {}
@@ -420,7 +429,8 @@ def validate_packages(args, packages):
                     ('depends', 'missing-depended-package', ','),
                     ('obsoletes', 'missing-obsoleted-package', ',')
             ]:
-                if c in hints:
+                # if c is in hints, and not the empty string
+                if hints.get(c, ''):
                     for r in hints[c].split(splitchar):
                         if c == 'requires':
                             has_requires = True
@@ -606,6 +616,10 @@ def validate_packages(args, packages):
                 continue
 
             cv = packages[p].stability['curr']
+
+            if cv not in packages[p].vermap:
+                continue
+
             if cv != v:
                 if packages[p].vermap[v]['mtime'] == packages[p].vermap[cv]['mtime']:
                     # don't consider an equal mtime to be more recent
@@ -624,7 +638,7 @@ def validate_packages(args, packages):
 
         # identify a 'best' version to take certain information from: this is
         # the curr version, if we have one, otherwise, the highest version.
-        if 'curr' in packages[p].stability:
+        if ('curr' in packages[p].stability) and (packages[p].stability['curr'] in packages[p].vermap):
             packages[p].best_version = packages[p].stability['curr']
         elif len(packages[p].vermap):
             packages[p].best_version = sorted(packages[p].vermap.keys(), key=lambda v: SetupVersion(v), reverse=True)[0]
@@ -633,6 +647,15 @@ def validate_packages(args, packages):
             packages[p].best_version = None
             error = True
 
+        # warn if replace-versions lists a version which is less than the
+        # current version (which is pointless as the current version will
+        # replace it anyhow)
+        if 'replace-versions' in packages[p].override_hints:
+            if packages[p].best_version:
+                for rv in packages[p].override_hints['replace-versions'].split():
+                    if SetupVersion(rv) < SetupVersion(packages[p].best_version):
+                        logging.warning("package '%s' replace-versions: lists version '%s' which is less than current version" % (p, rv))
+
         # If the install tarball is empty and there is no source tarball, we
         # should probably be marked obsolete
         if not packages[p].skip:
@@ -846,6 +869,9 @@ def write_setup_ini(args, packages, arch):
             if 'message' in packages[p].version_hints[bv]:
                 print("message: %s" % packages[p].version_hints[bv]['message'], file=f)
 
+            if 'replace-versions' in packages[p].override_hints:
+                print("replace-versions: %s" % packages[p].override_hints['replace-versions'], file=f)
+
             # make a list of version sections
             #
             # (they are put in a particular order to ensure certain behaviour
@@ -927,7 +953,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', ''):
-                    print("depends: %s" % packages[p].version_hints[version]['depends'], file=f)
+                    print("depends2: %s" % packages[p].version_hints[version]['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/calm/pkg2html.py b/calm/pkg2html.py
index d591b64..754ba5d 100755
--- a/calm/pkg2html.py
+++ b/calm/pkg2html.py
@@ -38,7 +38,6 @@
 # flattened in the package listing to just the package name
 #
 
-from collections import defaultdict
 import argparse
 import glob
 import html
diff --git a/calm/spelling.py b/calm/spelling.py
index 2b477c1..793edd1 100644
--- a/calm/spelling.py
+++ b/calm/spelling.py
@@ -21,7 +21,6 @@
 # THE SOFTWARE.
 #
 
-import logging
 import re
 from enchant import DictWithPWL
 from enchant.checker import SpellChecker
@@ -125,7 +124,7 @@ def spellcheck_hints(args, packages):
                 # XXX: this is doing all the work to generate suggestions, which
                 # we then ignore, so could be written much more efficiently
                 for err in chkr:
-                    # logging.error("package '%s', hint '%s': Is '%s' a word?" % (p, k, err.word))
+                    # print("package '%s', hint '%s': Is '%s' a word?" % (p, k, err.word))
                     misspellings.setdefault(err.word, 0)
                     misspellings[err.word] += 1
 
diff --git a/pep8 b/pep8
index 2729252..db9c9c7 100755
--- a/pep8
+++ b/pep8
@@ -1,2 +1,4 @@
 #!/bin/sh
-grep -s -l '^#!/usr/bin/env python' calm/* tests/* | xargs python3 -m pycodestyle --count --show-source --max-line-length=240 --ignore=E129,E741
+set -e
+grep -s -l '^#!/usr/bin/env python' * calm/* test/* | xargs python3 -m pycodestyle --count --show-source --max-line-length=240 --ignore=E129,E741
+flake8 --ignore E129,E501,E741,F841
diff --git a/setup.py b/setup.py
index d5f68ca..1143f9f 100644
--- a/setup.py
+++ b/setup.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python
 from setuptools import setup
 
 setup(
@@ -9,7 +10,7 @@ setup(
     author_email='jon.turney@dronecode.org.uk',
     license='MIT',
     packages=['calm'],
-    entry_points= {
+    entry_points={
         'console_scripts': [
             'calm = calm.calm:main',
             'mksetupini = calm.mksetupini:main',
diff --git a/test/__init__.py b/test/__init__.py
index 2e574c0..784e7c9 100644
--- a/test/__init__.py
+++ b/test/__init__.py
@@ -1,2 +1 @@
-from . import test_calm
-
+__all__ = ['test_calm']
diff --git a/test/test_calm.py b/test/test_calm.py
index 7cacd01..35f0e24 100755
--- a/test/test_calm.py
+++ b/test/test_calm.py
@@ -105,6 +105,7 @@ def patched_pprint_ordered_dict(self, object, stream, indent, allowance, context
                                 context, level)
     write('}')
 
+
 @contextlib.contextmanager
 def pprint_patch():
     if isinstance(getattr(pprint.PrettyPrinter, '_dispatch', None), dict):
@@ -117,6 +118,7 @@ def pprint_patch():
     else:
         yield
 
+
 #
 #
 #
@@ -193,7 +195,7 @@ class CalmTest(unittest.TestCase):
             ["2.6.0+bzr6602-1", "2.6b2-1", 1],
             ["0.6.7+20150214+git3a710f9-1", "0.6.7-1", 1],
             ["15.8b-1", "15.8.0.1-2", -1],
-            ["1.2rc1-1","1.2.0-2", -1],
+            ["1.2rc1-1", "1.2.0-2", -1],
             # examples from https://fedoraproject.org/wiki/Archive:Tools/RPM/VersionComparison
             ["1.0010", "1.9", 1],
             ["1.05", "1.5", 0],
@@ -441,8 +443,7 @@ class CalmTest(unittest.TestCase):
                    (os.path.join(relarea_x86, 'keychain', 'keychain-2.6.8-1.tar.bz2'), '2016-11-02'),
                    (os.path.join(relarea_x86, 'keychain', 'keychain-2.6.8-1-src.tar.bz2'), '2016-11-02'),
                    (os.path.join(relarea_noarch, 'perl-Net-SMTP-SSL', 'perl-Net-SMTP-SSL-1.03-1.tar.xz'), '2016-11-01'),
-                   (os.path.join(relarea_noarch, 'perl-Net-SMTP-SSL', 'perl-Net-SMTP-SSL-1.03-1-src.tar.xz'), '2016-11-01'),
-        ]
+                   (os.path.join(relarea_noarch, 'perl-Net-SMTP-SSL', 'perl-Net-SMTP-SSL-1.03-1-src.tar.xz'), '2016-11-01')]
         for (f, t) in touches:
             os.system('touch %s -d %s' % (f, t))
 
diff --git a/test/testdata/inifile/setup.ini.expected b/test/testdata/inifile/setup.ini.expected
index ee8d17d..f77bfd9 100644
--- a/test/testdata/inifile/setup.ini.expected
+++ b/test/testdata/inifile/setup.ini.expected
@@ -54,18 +54,21 @@
  'e675b0ac4bc2c3e1c4971bc56d77b0cd53a9bdf5632873a235d7582e29dfd3e8a7bb04b28f6cdee3e6b3d14c25ed39392538e3f628a9bfda6c905646ebc3c225\n'
  'source: x86/release/cygwin/cygwin-2.2.1-1-src.tar.xz 228 '
  'e675b0ac4bc2c3e1c4971bc56d77b0cd53a9bdf5632873a235d7582e29dfd3e8a7bb04b28f6cdee3e6b3d14c25ed39392538e3f628a9bfda6c905646ebc3c225\n'
+ 'depends2: base-cygwin\n'
  '[prev]\n'
  'version: 2.2.0-1\n'
  'install: x86/release/cygwin/cygwin-2.2.0-1.tar.xz 228 '
  'e675b0ac4bc2c3e1c4971bc56d77b0cd53a9bdf5632873a235d7582e29dfd3e8a7bb04b28f6cdee3e6b3d14c25ed39392538e3f628a9bfda6c905646ebc3c225\n'
  'source: x86/release/cygwin/cygwin-2.2.0-1-src.tar.xz 228 '
  'e675b0ac4bc2c3e1c4971bc56d77b0cd53a9bdf5632873a235d7582e29dfd3e8a7bb04b28f6cdee3e6b3d14c25ed39392538e3f628a9bfda6c905646ebc3c225\n'
+ 'depends2: base-cygwin\n'
  '[test]\n'
  'version: 2.3.0-0.3\n'
  'install: x86/release/cygwin/cygwin-2.3.0-0.3.tar.xz 228 '
  'e675b0ac4bc2c3e1c4971bc56d77b0cd53a9bdf5632873a235d7582e29dfd3e8a7bb04b28f6cdee3e6b3d14c25ed39392538e3f628a9bfda6c905646ebc3c225\n'
  'source: x86/release/cygwin/cygwin-2.3.0-0.3-src.tar.xz 228 '
  'e675b0ac4bc2c3e1c4971bc56d77b0cd53a9bdf5632873a235d7582e29dfd3e8a7bb04b28f6cdee3e6b3d14c25ed39392538e3f628a9bfda6c905646ebc3c225\n'
+ 'depends2: base-cygwin\n'
  '\n'
  '@ cygwin-debuginfo\n'
  'sdesc: "Debug info for cygwin"\n'
@@ -78,18 +81,21 @@
  'e675b0ac4bc2c3e1c4971bc56d77b0cd53a9bdf5632873a235d7582e29dfd3e8a7bb04b28f6cdee3e6b3d14c25ed39392538e3f628a9bfda6c905646ebc3c225\n'
  'source: x86/release/cygwin/cygwin-2.2.1-1-src.tar.xz 228 '
  'e675b0ac4bc2c3e1c4971bc56d77b0cd53a9bdf5632873a235d7582e29dfd3e8a7bb04b28f6cdee3e6b3d14c25ed39392538e3f628a9bfda6c905646ebc3c225\n'
+ 'depends2: cygwin-debuginfo\n'
  '[prev]\n'
  'version: 2.2.0-1\n'
  'install: x86/release/cygwin/cygwin-debuginfo/cygwin-debuginfo-2.2.0-1.tar.xz 228 '
  'e675b0ac4bc2c3e1c4971bc56d77b0cd53a9bdf5632873a235d7582e29dfd3e8a7bb04b28f6cdee3e6b3d14c25ed39392538e3f628a9bfda6c905646ebc3c225\n'
  'source: x86/release/cygwin/cygwin-2.2.0-1-src.tar.xz 228 '
  'e675b0ac4bc2c3e1c4971bc56d77b0cd53a9bdf5632873a235d7582e29dfd3e8a7bb04b28f6cdee3e6b3d14c25ed39392538e3f628a9bfda6c905646ebc3c225\n'
+ 'depends2: cygwin-debuginfo\n'
  '[test]\n'
  'version: 2.3.0-0.3\n'
  'install: x86/release/cygwin/cygwin-debuginfo/cygwin-debuginfo-2.3.0-0.3.tar.xz 228 '
  'e675b0ac4bc2c3e1c4971bc56d77b0cd53a9bdf5632873a235d7582e29dfd3e8a7bb04b28f6cdee3e6b3d14c25ed39392538e3f628a9bfda6c905646ebc3c225\n'
  'source: x86/release/cygwin/cygwin-2.3.0-0.3-src.tar.xz 228 '
  'e675b0ac4bc2c3e1c4971bc56d77b0cd53a9bdf5632873a235d7582e29dfd3e8a7bb04b28f6cdee3e6b3d14c25ed39392538e3f628a9bfda6c905646ebc3c225\n'
+ 'depends2: cygwin-debuginfo\n'
  '\n'
  '@ cygwin-devel\n'
  'sdesc: "Core development files"\n'
@@ -131,12 +137,14 @@
  '0c7b7ad2636b6e23e40e8cb593196b3fabe9c44f7618ea9b2021b89ecdc08720a7f824be0beaa75c9e62dda9a7b5ed7e9c1ed147a1875c582e80866ad09533a2\n'
  'source: x86/release/keychain/keychain-2.7.1-1-src.tar.bz2 134875 '
  'cef733c5f1ba7380088ce4b12be0a70c3d657fd0e26beae11cf96bbbc2a02c492dafef700adac1059ee643208d76b5f19042e01d9628b2463b916b3dea13aa54\n'
+ 'depends2: openssh\n'
  '[prev]\n'
  'version: 2.6.8-1\n'
  'install: x86/release/keychain/keychain-2.6.8-1.tar.bz2 30476 '
  '05af40c0fabbd2ea8f8b74719434371a47c7751986fe6411c17e18cda7d03947c5785ed164dfe59b7238831cc10d8e29f4f88bf3414420bd3231423f424c00bd\n'
  'source: x86/release/keychain/keychain-2.6.8-1-src.tar.bz2 36347 '
  '2151b73a9ec2ece63a842ddad6de19bcfdf097b86d4cae932eeadfc64640997051254001f31081e80272e020887b9599188990368c833ba10886f0ba32a3415e\n'
+ 'depends2: openssh\n'
  '\n'
  '@ libdns_sd-devel\n'
  'sdesc: "Bonjour Zeroconf implementation"\n'
@@ -150,6 +158,7 @@
  'aff488008bee3486e25b539fe6ccd1397bd3c5c0ba2ee2cf34af279554baa195af7493ee51d6f8510735c9a2ea54436d776a71e768165716762aec286abbbf83\n'
  'source: x86/release/mDNSResponder/mDNSResponder-379.32.1-1-src.tar.bz2 195 '
  'aff488008bee3486e25b539fe6ccd1397bd3c5c0ba2ee2cf34af279554baa195af7493ee51d6f8510735c9a2ea54436d776a71e768165716762aec286abbbf83\n'
+ 'depends2: libdns_sd1\n'
  '\n'
  '@ libdns_sd1\n'
  'sdesc: "Bonjour Zeroconf implementation"\n'
@@ -179,6 +188,7 @@
  'aff488008bee3486e25b539fe6ccd1397bd3c5c0ba2ee2cf34af279554baa195af7493ee51d6f8510735c9a2ea54436d776a71e768165716762aec286abbbf83\n'
  'source: x86/release/mDNSResponder/mDNSResponder-379.32.1-1-src.tar.bz2 195 '
  'aff488008bee3486e25b539fe6ccd1397bd3c5c0ba2ee2cf34af279554baa195af7493ee51d6f8510735c9a2ea54436d776a71e768165716762aec286abbbf83\n'
+ 'depends2: libdns_sd1\n'
  '\n'
  '@ obs-a\n'
  'sdesc: "obsolete package A"\n'
@@ -220,12 +230,14 @@
  'e675b0ac4bc2c3e1c4971bc56d77b0cd53a9bdf5632873a235d7582e29dfd3e8a7bb04b28f6cdee3e6b3d14c25ed39392538e3f628a9bfda6c905646ebc3c225\n'
  'source: x86/release/per-version/per-version-4.8-1-src.tar.xz 228 '
  'e675b0ac4bc2c3e1c4971bc56d77b0cd53a9bdf5632873a235d7582e29dfd3e8a7bb04b28f6cdee3e6b3d14c25ed39392538e3f628a9bfda6c905646ebc3c225\n'
+ 'depends2: base-cygwin\n'
  '[prev]\n'
  'version: 4.0-1\n'
  'install: x86/release/per-version/per-version-4.0-1.tar.xz 228 '
  'e675b0ac4bc2c3e1c4971bc56d77b0cd53a9bdf5632873a235d7582e29dfd3e8a7bb04b28f6cdee3e6b3d14c25ed39392538e3f628a9bfda6c905646ebc3c225\n'
  'source: x86/release/per-version/per-version-4.0-1-src.tar.xz 228 '
  'e675b0ac4bc2c3e1c4971bc56d77b0cd53a9bdf5632873a235d7582e29dfd3e8a7bb04b28f6cdee3e6b3d14c25ed39392538e3f628a9bfda6c905646ebc3c225\n'
+ 'depends2: cygwin\n'
  '\n'
  '@ per-version-replacement-hint-only\n'
  'sdesc: "Per-version hint test package"\n'
@@ -237,6 +249,7 @@
  'e675b0ac4bc2c3e1c4971bc56d77b0cd53a9bdf5632873a235d7582e29dfd3e8a7bb04b28f6cdee3e6b3d14c25ed39392538e3f628a9bfda6c905646ebc3c225\n'
  'source: x86/release/per-version-replacement-hint-only/per-version-replacement-hint-only-1.0-1-src.tar.xz 228 '
  'e675b0ac4bc2c3e1c4971bc56d77b0cd53a9bdf5632873a235d7582e29dfd3e8a7bb04b28f6cdee3e6b3d14c25ed39392538e3f628a9bfda6c905646ebc3c225\n'
+ 'depends2: cygwin\n'
  '\n'
  '@ perl-Net-SMTP-SSL\n'
  'sdesc: "Perl distribution Net-SMTP-SSL"\n'
@@ -305,12 +318,13 @@
  '@ test-c\n'
  'sdesc: "test package C"\n'
  'category: Devel\n'
+ 'requires: test-d test-e\n'
  'version: 1.0-1\n'
  'install: noarch/release/test-c/test-c-1.0-1.tar.xz 256 '
  'ef15790d8dc8163ed15dfca37565558203ed8b7569d586e0bc949f25282f44a1c059a60a7502863312b41cda649e3a9e2516d354eec9d54829e3ac1a3547097c\n'
  'source: noarch/release/test-c/test-c-1.0-1-src.tar.xz 256 '
  'ef15790d8dc8163ed15dfca37565558203ed8b7569d586e0bc949f25282f44a1c059a60a7502863312b41cda649e3a9e2516d354eec9d54829e3ac1a3547097c\n'
- 'depends: test-d (>= 1.0), test-e\n'
+ 'depends2: test-d (>= 1.0), test-e\n'
  'obsoletes: obs-a, obs-b\n'
  '\n'
  '@ test-d\n'
diff --git a/test/testdata/process_arch/setup.ini.expected b/test/testdata/process_arch/setup.ini.expected
index bdeea8c..7158b7d 100644
--- a/test/testdata/process_arch/setup.ini.expected
+++ b/test/testdata/process_arch/setup.ini.expected
@@ -54,18 +54,21 @@
  'e675b0ac4bc2c3e1c4971bc56d77b0cd53a9bdf5632873a235d7582e29dfd3e8a7bb04b28f6cdee3e6b3d14c25ed39392538e3f628a9bfda6c905646ebc3c225\n'
  'source: x86/release/cygwin/cygwin-2.2.1-1-src.tar.xz 228 '
  'e675b0ac4bc2c3e1c4971bc56d77b0cd53a9bdf5632873a235d7582e29dfd3e8a7bb04b28f6cdee3e6b3d14c25ed39392538e3f628a9bfda6c905646ebc3c225\n'
+ 'depends2: base-cygwin\n'
  '[prev]\n'
  'version: 2.2.0-1\n'
  'install: x86/release/cygwin/cygwin-2.2.0-1.tar.xz 228 '
  'e675b0ac4bc2c3e1c4971bc56d77b0cd53a9bdf5632873a235d7582e29dfd3e8a7bb04b28f6cdee3e6b3d14c25ed39392538e3f628a9bfda6c905646ebc3c225\n'
  'source: x86/release/cygwin/cygwin-2.2.0-1-src.tar.xz 228 '
  'e675b0ac4bc2c3e1c4971bc56d77b0cd53a9bdf5632873a235d7582e29dfd3e8a7bb04b28f6cdee3e6b3d14c25ed39392538e3f628a9bfda6c905646ebc3c225\n'
+ 'depends2: base-cygwin\n'
  '[test]\n'
  'version: 2.3.0-0.3\n'
  'install: x86/release/cygwin/cygwin-2.3.0-0.3.tar.xz 228 '
  'e675b0ac4bc2c3e1c4971bc56d77b0cd53a9bdf5632873a235d7582e29dfd3e8a7bb04b28f6cdee3e6b3d14c25ed39392538e3f628a9bfda6c905646ebc3c225\n'
  'source: x86/release/cygwin/cygwin-2.3.0-0.3-src.tar.xz 228 '
  'e675b0ac4bc2c3e1c4971bc56d77b0cd53a9bdf5632873a235d7582e29dfd3e8a7bb04b28f6cdee3e6b3d14c25ed39392538e3f628a9bfda6c905646ebc3c225\n'
+ 'depends2: base-cygwin\n'
  '\n'
  '@ cygwin-debuginfo\n'
  'sdesc: "Debug info for cygwin"\n'
@@ -78,18 +81,21 @@
  'e675b0ac4bc2c3e1c4971bc56d77b0cd53a9bdf5632873a235d7582e29dfd3e8a7bb04b28f6cdee3e6b3d14c25ed39392538e3f628a9bfda6c905646ebc3c225\n'
  'source: x86/release/cygwin/cygwin-2.2.1-1-src.tar.xz 228 '
  'e675b0ac4bc2c3e1c4971bc56d77b0cd53a9bdf5632873a235d7582e29dfd3e8a7bb04b28f6cdee3e6b3d14c25ed39392538e3f628a9bfda6c905646ebc3c225\n'
+ 'depends2: cygwin-debuginfo\n'
  '[prev]\n'
  'version: 2.2.0-1\n'
  'install: x86/release/cygwin/cygwin-debuginfo/cygwin-debuginfo-2.2.0-1.tar.xz 228 '
  'e675b0ac4bc2c3e1c4971bc56d77b0cd53a9bdf5632873a235d7582e29dfd3e8a7bb04b28f6cdee3e6b3d14c25ed39392538e3f628a9bfda6c905646ebc3c225\n'
  'source: x86/release/cygwin/cygwin-2.2.0-1-src.tar.xz 228 '
  'e675b0ac4bc2c3e1c4971bc56d77b0cd53a9bdf5632873a235d7582e29dfd3e8a7bb04b28f6cdee3e6b3d14c25ed39392538e3f628a9bfda6c905646ebc3c225\n'
+ 'depends2: cygwin-debuginfo\n'
  '[test]\n'
  'version: 2.3.0-0.3\n'
  'install: x86/release/cygwin/cygwin-debuginfo/cygwin-debuginfo-2.3.0-0.3.tar.xz 228 '
  'e675b0ac4bc2c3e1c4971bc56d77b0cd53a9bdf5632873a235d7582e29dfd3e8a7bb04b28f6cdee3e6b3d14c25ed39392538e3f628a9bfda6c905646ebc3c225\n'
  'source: x86/release/cygwin/cygwin-2.3.0-0.3-src.tar.xz 228 '
  'e675b0ac4bc2c3e1c4971bc56d77b0cd53a9bdf5632873a235d7582e29dfd3e8a7bb04b28f6cdee3e6b3d14c25ed39392538e3f628a9bfda6c905646ebc3c225\n'
+ 'depends2: cygwin-debuginfo\n'
  '\n'
  '@ cygwin-devel\n'
  'sdesc: "Core development files"\n'
@@ -131,12 +137,14 @@
  '0c7b7ad2636b6e23e40e8cb593196b3fabe9c44f7618ea9b2021b89ecdc08720a7f824be0beaa75c9e62dda9a7b5ed7e9c1ed147a1875c582e80866ad09533a2\n'
  'source: x86/release/keychain/keychain-2.7.1-1-src.tar.bz2 134875 '
  'cef733c5f1ba7380088ce4b12be0a70c3d657fd0e26beae11cf96bbbc2a02c492dafef700adac1059ee643208d76b5f19042e01d9628b2463b916b3dea13aa54\n'
+ 'depends2: openssh\n'
  '[prev]\n'
  'version: 2.6.8-1\n'
  'install: x86/release/keychain/keychain-2.6.8-1.tar.bz2 30476 '
  '05af40c0fabbd2ea8f8b74719434371a47c7751986fe6411c17e18cda7d03947c5785ed164dfe59b7238831cc10d8e29f4f88bf3414420bd3231423f424c00bd\n'
  'source: x86/release/keychain/keychain-2.6.8-1-src.tar.bz2 36347 '
  '2151b73a9ec2ece63a842ddad6de19bcfdf097b86d4cae932eeadfc64640997051254001f31081e80272e020887b9599188990368c833ba10886f0ba32a3415e\n'
+ 'depends2: openssh\n'
  '\n'
  '@ libdns_sd-devel\n'
  'sdesc: "Bonjour Zeroconf implementation"\n'
@@ -150,6 +158,7 @@
  'aff488008bee3486e25b539fe6ccd1397bd3c5c0ba2ee2cf34af279554baa195af7493ee51d6f8510735c9a2ea54436d776a71e768165716762aec286abbbf83\n'
  'source: x86/release/mDNSResponder/mDNSResponder-379.32.1-1-src.tar.bz2 195 '
  'aff488008bee3486e25b539fe6ccd1397bd3c5c0ba2ee2cf34af279554baa195af7493ee51d6f8510735c9a2ea54436d776a71e768165716762aec286abbbf83\n'
+ 'depends2: libdns_sd1\n'
  '\n'
  '@ libdns_sd1\n'
  'sdesc: "Bonjour Zeroconf implementation"\n'
@@ -179,6 +188,7 @@
  'aff488008bee3486e25b539fe6ccd1397bd3c5c0ba2ee2cf34af279554baa195af7493ee51d6f8510735c9a2ea54436d776a71e768165716762aec286abbbf83\n'
  'source: x86/release/mDNSResponder/mDNSResponder-379.32.1-1-src.tar.bz2 195 '
  'aff488008bee3486e25b539fe6ccd1397bd3c5c0ba2ee2cf34af279554baa195af7493ee51d6f8510735c9a2ea54436d776a71e768165716762aec286abbbf83\n'
+ 'depends2: libdns_sd1\n'
  '\n'
  '@ obs-a\n'
  'sdesc: "obsolete package A"\n'
@@ -220,18 +230,21 @@
  'e675b0ac4bc2c3e1c4971bc56d77b0cd53a9bdf5632873a235d7582e29dfd3e8a7bb04b28f6cdee3e6b3d14c25ed39392538e3f628a9bfda6c905646ebc3c225\n'
  'source: x86/release/per-version/per-version-4.8-1-src.tar.xz 228 '
  'e675b0ac4bc2c3e1c4971bc56d77b0cd53a9bdf5632873a235d7582e29dfd3e8a7bb04b28f6cdee3e6b3d14c25ed39392538e3f628a9bfda6c905646ebc3c225\n'
+ 'depends2: base-cygwin\n'
  '[prev]\n'
  'version: 4.0-1\n'
  'install: x86/release/per-version/per-version-4.0-1.tar.xz 228 '
  'e675b0ac4bc2c3e1c4971bc56d77b0cd53a9bdf5632873a235d7582e29dfd3e8a7bb04b28f6cdee3e6b3d14c25ed39392538e3f628a9bfda6c905646ebc3c225\n'
  'source: x86/release/per-version/per-version-4.0-1-src.tar.xz 228 '
  'e675b0ac4bc2c3e1c4971bc56d77b0cd53a9bdf5632873a235d7582e29dfd3e8a7bb04b28f6cdee3e6b3d14c25ed39392538e3f628a9bfda6c905646ebc3c225\n'
+ 'depends2: cygwin\n'
  '[test]\n'
  'version: 5.0-1\n'
  'install: x86/release/per-version/per-version-5.0-1.tar.xz 228 '
  'e675b0ac4bc2c3e1c4971bc56d77b0cd53a9bdf5632873a235d7582e29dfd3e8a7bb04b28f6cdee3e6b3d14c25ed39392538e3f628a9bfda6c905646ebc3c225\n'
  'source: x86/release/per-version/per-version-5.0-1-src.tar.xz 228 '
  'e675b0ac4bc2c3e1c4971bc56d77b0cd53a9bdf5632873a235d7582e29dfd3e8a7bb04b28f6cdee3e6b3d14c25ed39392538e3f628a9bfda6c905646ebc3c225\n'
+ 'depends2: base-cygwin\n'
  '\n'
  '@ per-version-replacement-hint-only\n'
  'sdesc: "Replacement per-version hint test package - updated"\n'
@@ -243,6 +256,7 @@
  'e675b0ac4bc2c3e1c4971bc56d77b0cd53a9bdf5632873a235d7582e29dfd3e8a7bb04b28f6cdee3e6b3d14c25ed39392538e3f628a9bfda6c905646ebc3c225\n'
  'source: x86/release/per-version-replacement-hint-only/per-version-replacement-hint-only-1.0-1-src.tar.xz 228 '
  'e675b0ac4bc2c3e1c4971bc56d77b0cd53a9bdf5632873a235d7582e29dfd3e8a7bb04b28f6cdee3e6b3d14c25ed39392538e3f628a9bfda6c905646ebc3c225\n'
+ 'depends2: base-cygwin, per-version\n'
  '\n'
  '@ perl-Net-SMTP-SSL\n'
  'sdesc: "Perl distribution Net-SMTP-SSL"\n'
@@ -299,12 +313,13 @@
  '@ test-c\n'
  'sdesc: "test package C"\n'
  'category: Devel\n'
+ 'requires: test-d test-e\n'
  'version: 1.0-1\n'
  'install: noarch/release/test-c/test-c-1.0-1.tar.xz 256 '
  'ef15790d8dc8163ed15dfca37565558203ed8b7569d586e0bc949f25282f44a1c059a60a7502863312b41cda649e3a9e2516d354eec9d54829e3ac1a3547097c\n'
  'source: noarch/release/test-c/test-c-1.0-1-src.tar.xz 256 '
  'ef15790d8dc8163ed15dfca37565558203ed8b7569d586e0bc949f25282f44a1c059a60a7502863312b41cda649e3a9e2516d354eec9d54829e3ac1a3547097c\n'
- 'depends: test-d (>= 1.0), test-e\n'
+ 'depends2: test-d (>= 1.0), test-e\n'
  'obsoletes: obs-a, obs-b\n'
  '\n'
  '@ test-d\n'
@@ -338,6 +353,7 @@
  'aff488008bee3486e25b539fe6ccd1397bd3c5c0ba2ee2cf34af279554baa195af7493ee51d6f8510735c9a2ea54436d776a71e768165716762aec286abbbf83\n'
  'source: x86/release/testpackage/testpackage-1.0-1-src.tar.bz2 195 '
  'aff488008bee3486e25b539fe6ccd1397bd3c5c0ba2ee2cf34af279554baa195af7493ee51d6f8510735c9a2ea54436d776a71e768165716762aec286abbbf83\n'
+ 'depends2: cygwin\n'
  '\n'
  '@ testpackage-subpackage\n'
  'sdesc: "A test subpackage"\n'
diff --git a/test/testdata/uploads/pkglist.expected b/test/testdata/uploads/pkglist.expected
index 4275391..8498ce9 100644
--- a/test/testdata/uploads/pkglist.expected
+++ b/test/testdata/uploads/pkglist.expected
@@ -5,7 +5,8 @@
                     'Like it’s you’re Markup Language™ Nokogiri’s tool―that '
                     'Bézier."',
            'category': 'Devel',
-           'requires': 'cygwin'}}, {}, False),
+           'requires': 'cygwin',
+           'depends': 'cygwin'}}, {}, False),
  'testpackage-subpackage': Package('x86/release/testpackage/testpackage-subpackage', {'1.0-1': {'testpackage-subpackage-1.0-1.tar.bz2': Tar('aff488008bee3486e25b539fe6ccd1397bd3c5c0ba2ee2cf34af279554baa195af7493ee51d6f8510735c9a2ea54436d776a71e768165716762aec286abbbf83', 195, False)}}, {'1.0-1': {'sdesc': '"A test subpackage"',
            'ldesc': '"A test subpackage"',
            'category': 'Devel',



More information about the Cygwin-apps-cvs mailing list