File tree Expand file tree Collapse file tree 2 files changed +41
-12
lines changed
Expand file tree Collapse file tree 2 files changed +41
-12
lines changed Original file line number Diff line number Diff line change 1+
2+ def translated_arch () -> dict :
3+ """System architectures translated to deb package architecture names
4+
5+ Returns:
6+ dict: dictionary of arch names
7+ """
8+ # TODO Need improve above docstring
9+
10+ # SystemArchitecture:PackageArchitecture
11+ return dict (
12+ {
13+ "armhf" : "armhf" ,
14+ "arm" : "armhf" ,
15+ "arm64" : "aarch64" ,
16+ "aarch64" : "aarch64" ,
17+ "amd64" : "amd64" ,
18+ "x86_64" : "amd64"
19+ }
20+ )
21+
22+
23+
24+ def ReverseTranslate () -> dict :
25+ StoPdict = translated_arch ();
26+ PtoSdict = {}
27+
28+ for SysArch ,PakArch in zip (StoPdict .keys (),StoPdict .values ()):
29+ if PakArch in PtoSdict :
30+ PtoSdict [PakArch ] = [PtoSdict [PakArch ]]
31+ PtoSdict [PakArch ].append (SysArch )
32+ else :
33+ PtoSdict [PakArch ] = SysArch
34+
35+ return PtoSdict
Original file line number Diff line number Diff line change 22import json
33import optparse
44import utils
5+ import arch
56
67GIT_ROOT = os .popen ("git rev-parse --show-toplevel" ).read ().strip ()
78DIR = "fs-cook/out"
@@ -29,21 +30,14 @@ def strip_info(file):
2930 name = os .path .splitext (basename )[0 ]
3031 name = os .path .splitext (name )[0 ]
3132
32- sp = name .split ("-" )
33- ar = {
34- "armhf" : "armhf" ,
35- "arm" : "armhf" ,
36- "arm64" : "aarch64" ,
37- "aarch64" : "aarch64" ,
38- "amd64" : "amd64" ,
39- "x86_64" : "amd64"
40- }
33+ sp = name .split ("-" )
34+ StoPdict = arch .translate ()
4135
4236 suite = sp [0 ]
4337 variant = sp [1 ]
44- arch = ar [sp [2 ]]
45-
46- return [suite , variant , arch , basename ]
38+ packageArchitecture = StoPdict [sp [2 ]]
39+
40+ return [suite , variant , packageArchitecture , basename ]
4741
4842def get_release_url (release_tag , file ) -> str :
4943 repo = "https://github.com/RandomCoderOrg/udroid-download"
You can’t perform that action at this time.
0 commit comments