Kickstart packages --default parsing query

Amit Saha <[email protected]>
Newsgroups gmane.linux.redhat.kickstart.general
Message-ID <CANODV3=RfBxeum=c0CE3u2xku=hg8pyhzk0jczRgJT_YmrfE-Q@mail.gmail.com>
Hello all:

I am trying to add a repository to an existing KS file. This is the script [1].

The script is doing its job for KS files which do not have a
'--default' switch added to the %packages section. However, for a KS
file which has a %packages --default section added, the parser does
not read beyond it and hence creates a KS file which do not have any
of the following packages specified in the KS file.

To quickly verify the problem, I have added two KS files (basically
the fedora-install-fedora.ks used to create Fedora installation DVDs)
with one having the --default option, and the other not having it. I
have commented out the actual repo addition code so that the problem
can be reproduced easily.

For example, with the default.ks file:

$python ks_addrepo.py

#version=DEVEL
repo --name="fedora"
--mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch
--excludepkgs="kernel*debug*,kernel-kdump*,syslog-ng*,java-1.5.0-gcj-devel,astronomy-bookmarks,generic*,java-1.5.0-gcj-javadoc,btanks*,GConf2-dbus*,bluez-gnome"
repo --name="fedora-source"
--mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-source-$releasever&arch=$basearch
--excludepkgs="kernel*debug*,kernel-kdump*,syslog-ng*,java-1.5.0-gcj-devel,astronomy-bookmarks,generic*,java-1.5.0-gcj-javadoc,btanks*,GConf2-dbus*,bluez-gnome"
# Installation logging level
logging --level=info


%packages --default

%end

And with the nodefault.ks file:

$python ks_addrepo.py

#version=DEVEL
repo --name="fedora"
--mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch
--excludepkgs="kernel*debug*,kernel-kdump*,syslog-ng*,java-1.5.0-gcj-devel,astronomy-bookmarks,generic*,java-1.5.0-gcj-javadoc,btanks*,GConf2-dbus*,bluez-gnome"
repo --name="fedora-source"
--mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-source-$releasever&arch=$basearch
--excludepkgs="kernel*debug*,kernel-kdump*,syslog-ng*,java-1.5.0-gcj-devel,astronomy-bookmarks,generic*,java-1.5.0-gcj-javadoc,btanks*,GConf2-dbus*,bluez-gnome"
# Installation logging level
logging --level=info


%packages
@afrikaans-support
@albanian-support
@arabic-support
@armenian-support
@assamese-support
@basque-support
@belarusian-support
@bengali-support
@bhutanese-support
@bosnian-support
@brazilian-support
@breton-support
@british-support
@bulgarian-support
@burmese-support
@catalan-support
@chinese-support
@croatian-support
@czech-support
@danish-support
@development-libs
@development-tools
@dial-up
@dns-server
@dutch-support
@eclipse
@esperanto-support
@estonian-support
@ethiopic-support
@faroese-support
@fedora-packager
@filesystems
@filipino-support
@finnish-support
@french-support
@ftp-server
@gaelic-support
@galician-support
@georgian-support
@german-support
@gnome-software-development
@greek-support
@gujarati-support
@hebrew-support
..
..

[1] https://github.com/amitsaha/gsoc2012_fbs/blob/master/scripts/ks_addrepo.py

Have I hit a bug or is it something which is known can be worked around?


Thanks a lot in advance.

Best,
Amit
-- 
http://echorand.me
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.