|
|
|
@ -60,7 +60,7 @@ def create_db():
|
|
|
|
|
overlays = get_list_overlays()
|
|
|
|
|
recovers = ScanRecoverFile()
|
|
|
|
|
pkg_list ={}
|
|
|
|
|
listUses= dict(LocalUSE=get_local_USE(), GlobalUSE=get_global_USE())
|
|
|
|
|
listUses= dict(LocalUSE=get_local_USE(), GlobalUSE=get_global_USE()) #[0] LocalUSE=get_local_USE(),
|
|
|
|
|
InstallPkgs= sort_install_pkg()
|
|
|
|
|
portage_list ={}
|
|
|
|
|
port_dir =["/var/db/repos", "/usr/portage"]
|
|
|
|
@ -86,8 +86,8 @@ def create_db():
|
|
|
|
|
print(e)
|
|
|
|
|
|
|
|
|
|
if not pkg_name[:-1] in all_pkgs:
|
|
|
|
|
portage_list[pkg_name] = search(pkg_name)
|
|
|
|
|
print
|
|
|
|
|
#portage_list[pkg_name] = search(pkg_name)
|
|
|
|
|
#print
|
|
|
|
|
|
|
|
|
|
#print(str(d.split("/")[-2] +"/" + d.split("/")[-1] +"\n"))
|
|
|
|
|
if str(d.split("/")[-2] +"/" + d.split("/")[-1]) in AliaseCategory:
|
|
|
|
@ -99,15 +99,16 @@ def create_db():
|
|
|
|
|
if d.split("/")[-2] not in pkg_list.keys():
|
|
|
|
|
pkg_list[str(d.split("/")[-2])] = []
|
|
|
|
|
pkg_list[d.split("/")[-2]].append(d.split('/')[-1])
|
|
|
|
|
if search(str(d.split("/")[-2]))['Name'] != 'Package is not Found':
|
|
|
|
|
#if search(str(d.split("/")[-2]))['Name'] != 'Package is not Found':
|
|
|
|
|
#portage_list[str(d.split("/")[-2] +"/" + d.split("/")[-1])] = search(str(d.split("/")[-2]))
|
|
|
|
|
print([d.split("/")[-2]])
|
|
|
|
|
# print([d.split("/")[-2]])
|
|
|
|
|
else:
|
|
|
|
|
if d.split('/')[-1] not in pkg_list[d.split('/')[-2]]:
|
|
|
|
|
pkg_list[d.split("/")[-2]].append(d.split('/')[-1])
|
|
|
|
|
#print([d.split('/')[-1]])
|
|
|
|
|
#"all_pkgs": all_pkgs, [0]
|
|
|
|
|
fn.write(json.dumps({"all_pkgs": all_pkgs, "Catalog": pkg_list, "aliases": AliaseCategory, "overlays": overlays, "recovers": recovers, "usesDecription":listUses, "InstallPkgs":InstallPkgs }))
|
|
|
|
|
fn.write(json.dumps({ "all_pkgs": all_pkgs, "Catalog": pkg_list,"overlays": overlays, "aliases": AliaseCategory, "recovers": recovers, "usesDecription":listUses, "InstallPkgs":InstallPkgs }))
|
|
|
|
|
#json.length "InstallPkgs":InstallPkgs
|
|
|
|
|
print(len(pkg_list))
|
|
|
|
|
"""
|
|
|
|
|
with open('./portage.json', 'w') as p:
|
|
|
|
|