diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2021-05-03 15:23:29 +0300 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2021-05-03 16:24:42 +0300 |
commit | 80021e462e5f247fcc5f0de247e5a827eb38dee5 (patch) | |
tree | 7b74c33c42c682cd3bf5045c48675de8db24829d | |
parent | 82933c3ce30e75f1d34f1e970b07362ef6ac700d (diff) |
Ignore a 'cygwin-debuginfo' require: for has_requires purposes
cygport always makes debuginfo packages require that, even if they are
empty.
This currently effects only one package: python3-debuginfo, which is
empty and has no other requires:, so can now be omitted from setup.ini
(which is what we want, as installing it does nothing).
-rwxr-xr-x | calm/package.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/calm/package.py b/calm/package.py index ea41b1f..ba1dec8 100755 --- a/calm/package.py +++ b/calm/package.py @@ -507,9 +507,6 @@ def validate_packages(args, packages): # 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 - # remove any extraneous whitespace r = r.strip() @@ -518,6 +515,14 @@ def validate_packages(args, packages): if splitchar: r = re.sub(r'(.*) +\(.*\)', r'\1', r) + if c == 'requires': + # don't count cygwin-debuginfo for the purpose of + # checking if this package has any requires, as + # cygport always makes debuginfo packages require + # that, even if they are empty + if r != 'cygwin-debuginfo': + has_requires = True + # a package should not appear in it's own hint if r == p: lvl = logging.WARNING if p not in past_mistakes.self_requires else logging.DEBUG |