diff options
author | 2007-11-17 20:58:53 +0000 | |
---|---|---|
committer | 2007-11-17 20:58:53 +0000 | |
commit | a22845a01332ad083010025d47d5d75287db2b3b (patch) | |
tree | 9704825f71beed7649d48e9c438bd78a3ead5b93 | |
parent | add xdm, gdm, and kdm to package list (diff) | |
download | gli-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
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | src/GLIUtility.py | 22 |
2 files changed, 14 insertions, 12 deletions
@@ -3,6 +3,10 @@ # $Header: /var/cvsroot/gentoo/src/installer/ChangeLog,v 1.686 2006/09/15 16:37:11 agaffney Exp $ 17 Nov 2007; Andrew Gaffney <agaffney@gentoo.org> + src/GLIUtility: + add get_kernpkgs_from_cd() function + + 17 Nov 2007; Andrew Gaffney <agaffney@gentoo.org> src/GLIInstallProfile.py: add xdm, gdm, and kdm to package list 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") |