|
|
|
@ -164,7 +164,7 @@ def sort_install_pkg():
|
|
|
|
|
if pkg_name not in INSTALL:
|
|
|
|
|
INSTALL[d.replace(path, "").split('/')[0]] = []
|
|
|
|
|
INSTALL[d.replace(path,"").split('/')[0]].append(dict(name = pkg_name[:-1], ver = f.replace(pkg_name, "")))
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
INSTALL[d.replace(path,
|
|
|
|
|
"").split('/')[0]].append(dict(name = pkg_name[:-1],ver = f.replace(pkg_name, "")
|
|
|
|
@ -174,28 +174,28 @@ def sort_install_pkg():
|
|
|
|
|
INSTALL[d.replace(path, "").split('/')[0]].append(f.replace(".ebuild", "") )
|
|
|
|
|
INSTALL[d.replace(path,
|
|
|
|
|
"").split('/')[0]].append(f.replace(".ebuild", "")) #dict(name = pkg_name[:-1],ver = f.replace(pkg_name, "")
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#print(str(len(INSTALL)))
|
|
|
|
|
#return json.dumps({'install_pkgs':INSTALL})
|
|
|
|
|
return INSTALL
|
|
|
|
|
|
|
|
|
|
def scan_config_portage():
|
|
|
|
|
dirs_root = ["/var/db/repos", "/usr/portage"]
|
|
|
|
|
config = {}
|
|
|
|
|
i = 0
|
|
|
|
|
dr = {}
|
|
|
|
|
data = {}
|
|
|
|
|
pf = {}
|
|
|
|
|
for dir_root in dirs_root:
|
|
|
|
|
Dirs_root = ["/var/db/repos", "/usr/portage"]
|
|
|
|
|
Config = {}
|
|
|
|
|
I = 0
|
|
|
|
|
Dr = {}
|
|
|
|
|
Data = {}
|
|
|
|
|
Pf = {}
|
|
|
|
|
for Dir_root in Dirs_root:
|
|
|
|
|
for d, dirs, files in os.walk(dir_root):
|
|
|
|
|
print(str(d))
|
|
|
|
|
i += 1
|
|
|
|
|
I += 1
|
|
|
|
|
for fl in files:
|
|
|
|
|
with open(d + "/" + fl) as f:
|
|
|
|
|
pf[str(d.split('/')[-1]) + "/"+ fl]= f.read().split('\n')
|
|
|
|
|
Pf[str(d.split('/')[-1]) + "/"+ fl]= f.read().split('\n')
|
|
|
|
|
str(d.split('/')[-1])
|
|
|
|
|
#print(dr)
|
|
|
|
|
#config = {'portage': pf}
|
|
|
|
|
#print("config:\t" + str(config))
|
|
|
|
|
return config
|
|
|
|
|
return Config
|
|
|
|
|