Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/cygwin-apps/calm.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2023-04-09 21:51:27 +0300
committerJon Turney <jon.turney@dronecode.org.uk>2023-04-09 21:55:17 +0300
commitbb7f367c1915c6e67f4d3d5574c1120dc1f5658b (patch)
tree8828025f5cf58d508dd8c143609dacd9f60cebcf
parent405561a21232c7ef63c63767e27fd93a67e85f6b (diff)
mksetupini: Warn about migrating obsolete --okmissing options
Also drop obsolete, genini-compatible --okmissing option from help text.
-rwxr-xr-xcalm/mksetupini.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/calm/mksetupini.py b/calm/mksetupini.py
index 09ec5b1..66449e1 100755
--- a/calm/mksetupini.py
+++ b/calm/mksetupini.py
@@ -139,7 +139,7 @@ def main():
parser.add_argument('--disable-check', action=flatten_append, help='checks to disable', type=disable_check_choices, default=[], metavar=disable_check_choices.help())
parser.add_argument('--inifile', '-u', action='store', help='output filename', required=True)
parser.add_argument('--ignore-errors', action='store_true', help='ignore errors')
- parser.add_argument('--okmissing', action='append', help='superseded by --disable-check', choices=['curr', 'depended-package', 'obsoleted-package', 'required-package'])
+ parser.add_argument('--okmissing', action='append', help=argparse.SUPPRESS, choices=['curr', 'depended-package', 'obsoleted-package', 'required-package'])
parser.add_argument('--pkglist', action='store', nargs='?', metavar='FILE', help="package maintainer list (default: " + pkglist_default + ")", const=pkglist_default)
parser.add_argument('--release', action='store', help='value for setup-release key', default='')
parser.add_argument('--releasearea', action='store', metavar='DIR', help="release directory (default: " + relarea_default + ")", default=relarea_default, dest='rel_area')
@@ -160,7 +160,9 @@ def main():
# For the moment '--okmissing=foo' is silently transformed into it's
# equivalent '--disable-check=missing-foo'
if args.okmissing:
- args.disable_check.extend(['missing-' + m for m in args.okmissing])
+ for m in args.okmissing:
+ print("Warning: --okmissing={0} is obsolete, use --disable-check=missing-{0} instead".format(m), file=sys.stderr)
+ args.disable_check.append('missing-' + m)
# disabling either of these checks, implies both of these are disabled
# (since depends: is generated from requires:, and vice versa, if not