|
|
|
@ -24,7 +24,6 @@ def read_configs(filename):
|
|
|
|
|
def enable_overlays():
|
|
|
|
|
path='/etc/portage/repos.conf/'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def get_list_overlays():
|
|
|
|
|
overlays =[]
|
|
|
|
|
OverlayList={}
|
|
|
|
@ -141,24 +140,31 @@ def sort_install_pkg():
|
|
|
|
|
path = '/var/db/pkg/'
|
|
|
|
|
for d, dirs, files in os.walk(path):
|
|
|
|
|
for f in files:
|
|
|
|
|
if f.endswith('.ebuild'):
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
|
#ver=int(f.replace('.ebuild', '').split('-')[-1][0])
|
|
|
|
|
for pn in f.replace('.ebuild', '').split('-')[:-1]:
|
|
|
|
|
pkg_name = pkg_name + pn + "-"
|
|
|
|
|
|
|
|
|
|
except TypeError:
|
|
|
|
|
for pn in f.replace('.ebuild', '').split('-')[:-2]:
|
|
|
|
|
pkg_name = pkg_name + pn + "-"
|
|
|
|
|
except Exception as e:
|
|
|
|
|
try:
|
|
|
|
|
#ver=int(f.replace('.ebuild', '').split('-')[-1][0])
|
|
|
|
|
for pn in f.replace('.ebuild', '').split('-')[:-1]:
|
|
|
|
|
pkg_name = pkg_name + pn + "-"
|
|
|
|
|
except TypeError:
|
|
|
|
|
for pn in f.replace('.ebuild', '').split('-')[:-2]:
|
|
|
|
|
pkg_name = pkg_name + pn + "-"
|
|
|
|
|
except Exception as e:
|
|
|
|
|
print(e)
|
|
|
|
|
print(e)
|
|
|
|
|
print(pkg_name)
|
|
|
|
|
if pkg_name inot 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, "")
|
|
|
|
|
"""
|
|
|
|
|
if d.replace(path, "").split('/')[0] not in INSTALL:
|
|
|
|
|
INSTALL[d.replace(path, "").split('/')[0]] =[]
|
|
|
|
|
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})
|
|
|
|
|