1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-06-17 00:07:37 +02:00

change existing_src to existing_pkg_ver

This commit is contained in:
Kelly Brazil
2024-03-13 19:01:09 -07:00
parent 83fa32f615
commit 36de08a6f8
2 changed files with 22 additions and 22 deletions

View File

@ -23,7 +23,7 @@ Schema:
"package": string, "package": string,
"broken": string/null, "broken": string/null,
"proposed_pkg_ver": string, "proposed_pkg_ver": string,
"existing_src": string/null, "existing_pkg_ver": string/null,
"architecture": string "architecture": string
} }
] ]
@ -37,7 +37,7 @@ Examples:
"package": "dpkg", "package": "dpkg",
"broken": "1.19.7", "broken": "1.19.7",
"proposed_pkg_ver": "1.19.8 Debian:10.13/oldstable", "proposed_pkg_ver": "1.19.8 Debian:10.13/oldstable",
"existing_src": "Debian-Security:10/oldstable", "existing_pkg_ver": "Debian-Security:10/oldstable",
"architecture": "amd64" "architecture": "amd64"
}, },
{ {
@ -45,7 +45,7 @@ Examples:
"package": "dpkg", "package": "dpkg",
"broken": null, "broken": null,
"proposed_pkg_ver": "1.19.8 Debian:10.13/oldstable", "proposed_pkg_ver": "1.19.8 Debian:10.13/oldstable",
"existing_src": "Debian-Security:10/oldstable", "existing_pkg_ver": "Debian-Security:10/oldstable",
"architecture": "amd64" "architecture": "amd64"
}, },
{ {
@ -53,7 +53,7 @@ Examples:
"package": "dpkg", "package": "dpkg",
"broken": "1.19.7", "broken": "1.19.7",
"proposed_pkg_ver": "1.19.8 Debian:10.13/oldstable", "proposed_pkg_ver": "1.19.8 Debian:10.13/oldstable",
"existing_src": "Debian-Security:10/oldstable", "existing_pkg_ver": "Debian-Security:10/oldstable",
"architecture": "amd64" "architecture": "amd64"
}, },
{ {
@ -61,7 +61,7 @@ Examples:
"package": "dpkg", "package": "dpkg",
"broken": "1.19.7", "broken": "1.19.7",
"proposed_pkg_ver": "1.19.8 Debian:10.13/oldstable", "proposed_pkg_ver": "1.19.8 Debian:10.13/oldstable",
"existing_src": "Debian-Security:10/oldstable", "existing_pkg_ver": "Debian-Security:10/oldstable",
"architecture": "amd64" "architecture": "amd64"
}, },
{ {
@ -69,7 +69,7 @@ Examples:
"package": "base-files", "package": "base-files",
"broken": "10.3+deb10u4", "broken": "10.3+deb10u4",
"proposed_pkg_ver": "10.3+deb10u13 Debian:10.13/oldstable", "proposed_pkg_ver": "10.3+deb10u13 Debian:10.13/oldstable",
"existing_src": null, "existing_pkg_ver": null,
"architecture": "amd64" "architecture": "amd64"
}, },
{ {
@ -77,7 +77,7 @@ Examples:
"package": "base-files", "package": "base-files",
"broken": null, "broken": null,
"proposed_pkg_ver": "10.3+deb10u13 Debian:10.13/oldstable", "proposed_pkg_ver": "10.3+deb10u13 Debian:10.13/oldstable",
"existing_src": null, "existing_pkg_ver": null,
"architecture": "amd64" "architecture": "amd64"
}, },
{ {
@ -85,7 +85,7 @@ Examples:
"package": "dpkg", "package": "dpkg",
"broken": "1.19.7", "broken": "1.19.7",
"proposed_pkg_ver": "1.19.8 Debian:10.13/oldstable", "proposed_pkg_ver": "1.19.8 Debian:10.13/oldstable",
"existing_src": "Debian-Security:10/oldstable", "existing_pkg_ver": "Debian-Security:10/oldstable",
"architecture": "amd64" "architecture": "amd64"
}, },
{ {
@ -93,7 +93,7 @@ Examples:
"package": "dpkg", "package": "dpkg",
"broken": null, "broken": null,
"proposed_pkg_ver": "1.19.8 Debian:10.13/oldstable", "proposed_pkg_ver": "1.19.8 Debian:10.13/oldstable",
"existing_src": "Debian-Security:10/oldstable", "existing_pkg_ver": "Debian-Security:10/oldstable",
"architecture": "amd64" "architecture": "amd64"
} }
] ]
@ -105,7 +105,7 @@ Examples:
"package": "dpkg", "package": "dpkg",
"broken": "1.19.7", "broken": "1.19.7",
"proposed_pkg_ver": "1.19.8 Debian:10.13/oldstable", "proposed_pkg_ver": "1.19.8 Debian:10.13/oldstable",
"existing_src": "Debian-Security:10/oldstable", "existing_pkg_ver": "Debian-Security:10/oldstable",
"architecture": "amd64" "architecture": "amd64"
}, },
{ {
@ -113,7 +113,7 @@ Examples:
"package": "dpkg", "package": "dpkg",
"broken": null, "broken": null,
"proposed_pkg_ver": "1.19.8 Debian:10.13/oldstable", "proposed_pkg_ver": "1.19.8 Debian:10.13/oldstable",
"existing_src": "Debian-Security:10/oldstable", "existing_pkg_ver": "Debian-Security:10/oldstable",
"architecture": "amd64" "architecture": "amd64"
}, },
{ {
@ -121,7 +121,7 @@ Examples:
"package": "dpkg", "package": "dpkg",
"broken": "1.19.7", "broken": "1.19.7",
"proposed_pkg_ver": "1.19.8 Debian:10.13/oldstable", "proposed_pkg_ver": "1.19.8 Debian:10.13/oldstable",
"existing_src": "Debian-Security:10/oldstable", "existing_pkg_ver": "Debian-Security:10/oldstable",
"architecture": "amd64" "architecture": "amd64"
}, },
{ {
@ -129,7 +129,7 @@ Examples:
"package": "dpkg", "package": "dpkg",
"broken": "1.19.7", "broken": "1.19.7",
"proposed_pkg_ver": "1.19.8 Debian:10.13/oldstable", "proposed_pkg_ver": "1.19.8 Debian:10.13/oldstable",
"existing_src": "Debian-Security:10/oldstable", "existing_pkg_ver": "Debian-Security:10/oldstable",
"architecture": "amd64" "architecture": "amd64"
}, },
{ {
@ -137,7 +137,7 @@ Examples:
"package": "base-files", "package": "base-files",
"broken": "10.3+deb10u4", "broken": "10.3+deb10u4",
"proposed_pkg_ver": "10.3+deb10u13 Debian:10.13/oldstable", "proposed_pkg_ver": "10.3+deb10u13 Debian:10.13/oldstable",
"existing_src": null, "existing_pkg_ver": null,
"architecture": "amd64" "architecture": "amd64"
}, },
{ {
@ -145,7 +145,7 @@ Examples:
"package": "base-files", "package": "base-files",
"broken": null, "broken": null,
"proposed_pkg_ver": "10.3+deb10u13 Debian:10.13/oldstable", "proposed_pkg_ver": "10.3+deb10u13 Debian:10.13/oldstable",
"existing_src": null, "existing_pkg_ver": null,
"architecture": "amd64" "architecture": "amd64"
}, },
{ {
@ -153,7 +153,7 @@ Examples:
"package": "dpkg", "package": "dpkg",
"broken": "1.19.7", "broken": "1.19.7",
"proposed_pkg_ver": "1.19.8 Debian:10.13/oldstable", "proposed_pkg_ver": "1.19.8 Debian:10.13/oldstable",
"existing_src": "Debian-Security:10/oldstable", "existing_pkg_ver": "Debian-Security:10/oldstable",
"architecture": "amd64" "architecture": "amd64"
}, },
{ {
@ -161,7 +161,7 @@ Examples:
"package": "dpkg", "package": "dpkg",
"broken": null, "broken": null,
"proposed_pkg_ver": "1.19.8 Debian:10.13/oldstable", "proposed_pkg_ver": "1.19.8 Debian:10.13/oldstable",
"existing_src": "Debian-Security:10/oldstable", "existing_pkg_ver": "Debian-Security:10/oldstable",
"architecture": "amd64" "architecture": "amd64"
} }
] ]
@ -238,7 +238,7 @@ def parse(
# Inst dpkg [1.19.7] (1.19.8 Debian:10.13/oldstable, Debian-Security:10/oldstable [amd64]) # Inst dpkg [1.19.7] (1.19.8 Debian:10.13/oldstable, Debian-Security:10/oldstable [amd64])
# | | | | | \architecture # | | | | | \architecture
# | | | | \existing_src (optional) # | | | | \existing_pkg_ver (optional)
# | | | \proposed_pkg_ver # | | | \proposed_pkg_ver
# | | \broken (optional) # | | \broken (optional)
# | \package # | \package
@ -250,7 +250,7 @@ def parse(
broken_val = None broken_val = None
packages_pe = None packages_pe = None
proposed_pkg_ver = None proposed_pkg_ver = None
existing_src = None existing_pkg_ver = None
parsed_line = line_re.match(line) parsed_line = line_re.match(line)
if parsed_line: if parsed_line:
@ -263,14 +263,14 @@ def parse(
packages_pe = parsed_dict['packages_pe'].split(',') packages_pe = parsed_dict['packages_pe'].split(',')
proposed_pkg_ver = packages_pe[0].strip() proposed_pkg_ver = packages_pe[0].strip()
if len(packages_pe) == 2: if len(packages_pe) == 2:
existing_src = packages_pe[1].strip() existing_pkg_ver = packages_pe[1].strip()
output_line = { output_line = {
'operation': parsed_dict['operation'], 'operation': parsed_dict['operation'],
'package': parsed_dict['package'], 'package': parsed_dict['package'],
'broken': broken_val, 'broken': broken_val,
'proposed_pkg_ver': proposed_pkg_ver, 'proposed_pkg_ver': proposed_pkg_ver,
'existing_src': existing_src, 'existing_pkg_ver': existing_pkg_ver,
'architecture': parsed_dict['architecture'] 'architecture': parsed_dict['architecture']
} }

View File

@ -1 +1 @@
[{"operation":"unpack","package":"dpkg","broken":"1.19.7","proposed_pkg_ver":"1.19.8 Debian:10.13/oldstable","existing_src":"Debian-Security:10/oldstable","architecture":"amd64"},{"operation":"unpack","package":"dpkg","broken":null,"proposed_pkg_ver":"1.19.8 Debian:10.13/oldstable","existing_src":"Debian-Security:10/oldstable","architecture":"amd64"},{"operation":"configure","package":"dpkg","broken":"1.19.7","proposed_pkg_ver":"1.19.8 Debian:10.13/oldstable","existing_src":"Debian-Security:10/oldstable","architecture":"amd64"},{"operation":"remove","package":"dpkg","broken":"1.19.7","proposed_pkg_ver":"1.19.8 Debian:10.13/oldstable","existing_src":"Debian-Security:10/oldstable","architecture":"amd64"},{"operation":"unpack","package":"base-files","broken":"10.3+deb10u4","proposed_pkg_ver":"10.3+deb10u13 Debian:10.13/oldstable","existing_src":null,"architecture":"amd64"},{"operation":"configure","package":"base-files","broken":null,"proposed_pkg_ver":"10.3+deb10u13 Debian:10.13/oldstable","existing_src":null,"architecture":"amd64"},{"operation":"unpack","package":"dpkg","broken":"1.19.7","proposed_pkg_ver":"1.19.8 Debian:10.13/oldstable","existing_src":"Debian-Security:10/oldstable","architecture":"amd64"},{"operation":"configure","package":"dpkg","broken":null,"proposed_pkg_ver":"1.19.8 Debian:10.13/oldstable","existing_src":"Debian-Security:10/oldstable","architecture":"amd64"}] [{"operation":"unpack","package":"dpkg","broken":"1.19.7","proposed_pkg_ver":"1.19.8 Debian:10.13/oldstable","existing_pkg_ver":"Debian-Security:10/oldstable","architecture":"amd64"},{"operation":"unpack","package":"dpkg","broken":null,"proposed_pkg_ver":"1.19.8 Debian:10.13/oldstable","existing_pkg_ver":"Debian-Security:10/oldstable","architecture":"amd64"},{"operation":"configure","package":"dpkg","broken":"1.19.7","proposed_pkg_ver":"1.19.8 Debian:10.13/oldstable","existing_pkg_ver":"Debian-Security:10/oldstable","architecture":"amd64"},{"operation":"remove","package":"dpkg","broken":"1.19.7","proposed_pkg_ver":"1.19.8 Debian:10.13/oldstable","existing_pkg_ver":"Debian-Security:10/oldstable","architecture":"amd64"},{"operation":"unpack","package":"base-files","broken":"10.3+deb10u4","proposed_pkg_ver":"10.3+deb10u13 Debian:10.13/oldstable","existing_pkg_ver":null,"architecture":"amd64"},{"operation":"configure","package":"base-files","broken":null,"proposed_pkg_ver":"10.3+deb10u13 Debian:10.13/oldstable","existing_pkg_ver":null,"architecture":"amd64"},{"operation":"unpack","package":"dpkg","broken":"1.19.7","proposed_pkg_ver":"1.19.8 Debian:10.13/oldstable","existing_pkg_ver":"Debian-Security:10/oldstable","architecture":"amd64"},{"operation":"configure","package":"dpkg","broken":null,"proposed_pkg_ver":"1.19.8 Debian:10.13/oldstable","existing_pkg_ver":"Debian-Security:10/oldstable","architecture":"amd64"}]