aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/GLIUtility.py')
-rw-r--r--src/GLIUtility.py22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/GLIUtility.py b/src/GLIUtility.py
index 0389e4b..13670ea 100644
--- a/src/GLIUtility.py
+++ b/src/GLIUtility.py
@@ -914,20 +914,18 @@ def uncdata(text):
return text
def get_grp_pkgs_from_cd():
- """
- if not is_file("/usr/livecd/grppkgs.txt"):
- return ""
- #raise GLIException("GLIUtilityError", "fatal", "get_grp_pkgs_from_cd", "Required file /usr/livecd/grppkgs.txt does not exist")
- status,output = spawn('cat /usr/livecd/grppkgs.txt',return_output=True)
- output = output.split()
- #remove the first part before a / for comparision
- results = []
- for pkg in output:
- results.append(pkg[(pkg.find('/')+1):])
- return results
- """
return spawn(r"find /var/db/pkg -mindepth 2 -maxdepth 2 -type d | sed -e 's:^/var/db/pkg/::' -e 's:-[0-9].*$::'", return_output=True)[1].strip().split("\n")
+def get_kernpkgs_from_cd():
+ kernpkgs = {}
+ try:
+ f_kernpkgs = open("/usr/livecd/kernpkgs.txt", "r")
+ except:
+ return
+ for x in f_kernpkgs:
+ kernpkgs[x] = spawn(r"cat /var/db/pkg/" + x + r"-*/DESCRIPTION", return_output=True)[1].strip()
+ return kernpkgs
+
def get_keymaps():
return GLIUtility.spawn(r"find /usr/share/keymaps -iname *.map.gz | sed -e 's:^.\+/::' -e 's:\..\+$::' | sort", return_output=True)[1].strip().split("\n")