Fix distro-info-data helper for aramo release.
This commit is contained in:
parent
e555149150
commit
cfb0963548
2 changed files with 55 additions and 43 deletions
39
helpers/DATA/distro-info-data/add_trisquel_tools_py.patch
Normal file
39
helpers/DATA/distro-info-data/add_trisquel_tools_py.patch
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
--- lib/tools.py 2021-10-15 08:01:00.000000000 -0500
|
||||
+++ lib/tools.py 2022-04-06 12:27:07.672427372 -0500
|
||||
@@ -37,7 +37,7 @@
|
||||
def main(validation_function):
|
||||
"""Main function with command line parameter parsing."""
|
||||
script_name = os.path.basename(sys.argv[0])
|
||||
- usage = "%s [-h] -d|-u csv-file" % (script_name)
|
||||
+ usage = "%s [-h] -d|-u|-t csv-file" % (script_name)
|
||||
parser = argparse.ArgumentParser(usage=usage)
|
||||
|
||||
parser.add_argument(
|
||||
@@ -56,15 +56,24 @@
|
||||
default=False,
|
||||
help="validate an Ubuntu CSV file",
|
||||
)
|
||||
+ parser.add_argument(
|
||||
+ "-t",
|
||||
+ "--trisquel",
|
||||
+ dest="trisquel",
|
||||
+ action="store_true",
|
||||
+ default=False,
|
||||
+ help="validate a Trisquel CSV file")
|
||||
parser.add_argument("csv_file", metavar="csv-file", help="CSV file to validate")
|
||||
|
||||
args = parser.parse_args()
|
||||
- if len([x for x in [args.debian, args.ubuntu] if x]) != 1:
|
||||
- parser.error("You have to select exactly one of --debian, --ubuntu.")
|
||||
+ if len([x for x in [args.trisquel, args.debian, args.ubuntu] if x]) != 1:
|
||||
+ parser.error("You have to select exactly one of --trisquel, --debian, --ubuntu.")
|
||||
|
||||
if args.debian:
|
||||
distro = "debian"
|
||||
- else:
|
||||
+ elif args.ubuntu:
|
||||
distro = "ubuntu"
|
||||
+ else:
|
||||
+ distro = "trisquel"
|
||||
|
||||
return int(not validation_function(args.csv_file, distro))
|
||||
Loading…
Add table
Add a link
Reference in a new issue