yum allows configuring each repository to exclude certain packages from view, which is handy to ensure that packages in a local repository take precedence over whatever happens to be in the fedora-updates repository. These patches are my attempt to add an --exclude option to the kickstart repo command (although I'm not sure whether this is the correct venue for pykickstart changes). --Ed
Index: pykickstart-0.36/pykickstart/data.py =================================================================== --- pykickstart-0.36.orig/pykickstart/data.py +++ pykickstart-0.36/pykickstart/data.py @@ -151,6 +151,7 @@ class KickstartRepoData: self.baseurl = "" self.mirrorlist = "" self.name = "" + self.exclude = [] class KickstartUserData: def __init__ (self): Index: pykickstart-0.36/pykickstart/parser.py =================================================================== --- pykickstart-0.36.orig/pykickstart/parser.py +++ pykickstart-0.36/pykickstart/parser.py @@ -703,6 +703,7 @@ class KickstartHandlers: op.add_option("--name", dest="name", required=1) op.add_option("--baseurl") op.add_option("--mirrorlist") + op.add_option("--exclude", default=[], action="append") (opts, extra) = op.parse_args(args=args)
Index: anaconda-11.1.1.3/yuminstall.py =================================================================== --- anaconda-11.1.1.3.orig/yuminstall.py +++ anaconda-11.1.1.3/yuminstall.py @@ -171,7 +171,8 @@ class simpleCallback: class AnacondaYumRepo(YumRepository): def __init__( self, uri=None, mirrorlist=None, repoid='anaconda%s' % productStamp, - root = "/mnt/sysimage/"): + root = "/mnt/sysimage/", + exclude=[]): YumRepository.__init__(self, repoid) conf = yum.config.RepoConf() for k, v in conf.iteritems(): @@ -188,6 +189,8 @@ class AnacondaYumRepo(YumRepository): elif mirrorlist and not uri: self.mirrorlist = mirrorlist + self.exclude = exclude + self.setAttribute('cachedir', '/tmp/cache/') self.setAttribute('pkgdir', root) self.setAttribute('hdrdir', '/tmp/cache/headers') @@ -498,7 +501,8 @@ class AnacondaYum(YumSorter): for ksrepo in self.anaconda.id.ksdata.repoList: repo = AnacondaYumRepo(uri=ksrepo.baseurl, mirrorlist=ksrepo.mirrorlist, - repoid=ksrepo.name) + repoid=ksrepo.name, + exclude=ksrepo.exclude) repo.name = name repo.enable()