forked from technic/e2xvfb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
opkg.py
96 lines (81 loc) · 1.8 KB
/
opkg.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
from curses.ascii import ctrl
import os
pack = ""
lists = ""
for l in os.listdir("/usr/share/enigma2/po"):
if ".po" in l:
continue
pack += """Package: enigma2-locale-%s
Version: 7.1
Depends: enigma2
Status: install ok installed
Architecture: all
Installed-Size: 186628
Installed-Time: 1652135548
Auto-Installed: yes
""" % (l)
ctl = """Package: enigma2-locale-%s
Version: 7.1
Description: %s
%s
Section: base
Priority: optional
Maintainer: OE-Alliance
License: GPLv2
Architecture: all
OE: enigma2
Depends: enigma2
Source: enigma2.bb
""" % (l, l, l)
with open("/var/lib/opkg/info/enigma2-locale-%s.control" % l, "w") as fd:
fd.write(ctl)
fd.flush()
lists += ctl
pack += """Package: enigma2-plugin-skins-metrix-atv-fhd-icons
Version: 7.1
Depends: enigma2
Status: install ok installed
Architecture: all
Installed-Size: 186628
Installed-Time: 1652135548
Auto-Installed: yes
"""
ctl = """Package: enigma2-plugin-skins-metrix-atv-fhd-icons
Version: 7.1
Description: enigma2-plugin-skins-metrix-atv-fhd-icons
enigma2-plugin-skins-metrix-atv-fhd-icons
Section: base
Priority: optional
Maintainer: OE-Alliance
License: GPLv2
Architecture: all
OE: enigma2
Depends: enigma2
Source: enigma2.bb
"""
with open("/var/lib/opkg/info/enigma2-plugin-skins-metrix-atv-fhd-icons.control", "w") as fd:
fd.write(ctl)
fd.flush()
with open("/var/lib/opkg/status", "w") as fd:
fd.write(pack)
fd.flush()
with open("/var/lib/opkg/lists/openatv-all", "w") as fd:
fd.write(pack)
fd.flush()
'''
Package: enigma2-locale-de
Version: 7.0+git31245+a39c8c5-r0
Description: de
de
Section: base
Priority: optional
Maintainer: OE-Alliance
License: GPLv2
Architecture: vusolo4k
OE: enigma2
Depends: enigma2
Source: enigma2.bb
Filename: enigma2-locale-de_7.0+git31245+a39c8c5-r0_vusolo4k.ipk
Size: 156584
MD5Sum: 930e07893f4d52c3afc1867d7a469804
'''