aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Gaffney <agaffney@gentoo.org>2007-11-17 20:58:53 +0000
committerAndrew Gaffney <agaffney@gentoo.org>2007-11-17 20:58:53 +0000
commita22845a01332ad083010025d47d5d75287db2b3b (patch)
tree9704825f71beed7649d48e9c438bd78a3ead5b93 /src
parentadd xdm, gdm, and kdm to package list (diff)
downloadgli-a22845a01332ad083010025d47d5d75287db2b3b.tar.gz
gli-a22845a01332ad083010025d47d5d75287db2b3b.tar.bz2
gli-a22845a01332ad083010025d47d5d75287db2b3b.zip
add get_kernpkgs_from_cd() function
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/gli/trunk@1867 f8877401-5920-0410-a79b-8e2d7e04ca0d
Diffstat (limited to 'src')
-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")