@torsava commented on this pull request.
> +
+
+if __name__ == "__main__":
+ """To allow this script to be importable (and its classes/functions
+ reused), actions are performed only when run as a main script."""
+
+ parser = argparse.ArgumentParser(prog=argv[0])
+ group = parser.add_mutually_exclusive_group(required=True)
+ group.add_argument('-P', '--provides', action='store_true', help='Print
Provides')
+ group.add_argument('-R', '--requires', action='store_true', help='Print
Requires')
+ group.add_argument('-r', '--recommends', action='store_true', help='Print
Recommends')
+ group.add_argument('-C', '--conflicts', action='store_true', help='Print
Conflicts')
+ group.add_argument('-E', '--extras', action='store_true', help='Print
Extras')
+ group_majorver = parser.add_mutually_exclusive_group()
+ group_majorver.add_argument('-M', '--majorver-provides',
action='store_true', help='Print extra Provides with Python major version only')
+ group_majorver.add_argument('--majorver-provides-versions', action='store',
> I'm mostly thinking of potential field parsing bugs. I'm thinking of if
> people call it twice with two comma separated lists. I don't know if we
> really want to make that case possible...
The reason I'm suggesting it is that `--majorver-provides-versions` doesn't
have a short form (and it's so specific that I don't think it should), and it
would result in very long calls, e.g. in Fedora we would need:
--provides --majorver-provides-versions 2.7 --majorver-provides-versions
3.8 --normalized-names-format pep503 --normalized-names-provide-both
I can actually make a test for all the possible ways to call
`--majorver-provides-versions` so it should be safe to implement it both ways.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1195#discussion_r415696889
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint