Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
package-helpers
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Eliab Andi Artz
package-helpers
Commits
cfb09635
Commit
cfb09635
authored
2 years ago
by
Luis Guzmán
Browse files
Options
Downloads
Patches
Plain Diff
Fix distro-info-data helper for aramo release.
parent
e5551491
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
helpers/DATA/distro-info-data/add_trisquel_tools_py.patch
+39
-0
39 additions, 0 deletions
helpers/DATA/distro-info-data/add_trisquel_tools_py.patch
helpers/DATA/distro-info-data/add_trisquel_validate.patch
+16
-43
16 additions, 43 deletions
helpers/DATA/distro-info-data/add_trisquel_validate.patch
with
55 additions
and
43 deletions
helpers/DATA/distro-info-data/add_trisquel_tools_py.patch
0 → 100644
+
39
−
0
View file @
cfb09635
--- 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))
This diff is collapsed.
Click to expand it.
helpers/DATA/distro-info-data/add_trisquel_validate.patch
+
16
−
43
View file @
cfb09635
--- validate-csv-data 202
0-01-27 15:25
:0
9
.000000000 -0
6
00
+++ validate-csv-data
_nabia 2021-11-25 01:56:57.107530515
-0
6
00
@@ -2
6
,6 +2
6,7
@@
import sys
--- validate-csv-data 202
1-10-15 08:01
:0
0
.000000000 -0
5
00
+++ validate-csv-data
2022-04-06 12:27:29.004706669
-0
5
00
@@ -2
7
,6 +2
7,13
@@
_COLUMNS = {
+ "trisquel": ("version", "codename", "series", "created", "release", "eol"),
"debian": ("version", "codename", "series", "created", "release", "eol"),
"ubuntu": ("version", "codename", "series", "created", "release", "eol",
"eol-server", "eol-esm"),
@@ -37,6 +38,7 @@
("eol", "eol-server"),
+ "trisquel": (
+ "version",
+ "codename",
+ "series",
+ "created",
+ "release",
+ "eol"),
"debian": (
"version",
"codename",
@@ -58,6 +65,7 @@
("eol-lts", "eol-elts"),
)
_STRINGS = {
+ "trisquel": ("version", "codename", "series"),
"debian": ("codename", "series"),
"ubuntu": ("version", "codename", "series"),
}
@@ -130,24 +132,28 @@
def main():
"""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("-d", "--debian", dest="debian", action="store_true",
default=False, help="validate a Debian CSV file")
parser.add_argument("-u", "--ubuntu", dest="ubuntu", action="store_true",
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 validate(args.csv_file, distro))
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment