Enable plugins so that we can use the priorities plugin
This might not be the best idea - e.g. just because you enable
and configure a plugin doesn't mean you want to change the
behaviour of pungi.
- add some way to make yum load a specific plugin with a
- add the code for handling repo priorities into pungi
- add the code for handling repo priorities into yum itself
Note, it would most likely make sense for e.g. anaconda and
livecd-creator to also handle priorities, so this isn't just
and issue for pungi
Signed-off-by: Mark McLoughlin <markmc(a)redhat.com>
@@ -81,6 +81,9 @@ class Gather(vpro.pypungi.PungiBase):
yumvars['basearch'] = yum.rpmUtils.arch.getBaseArch(myarch=self.config.get('default', 'arch'))
yumconf.yumvar = yumvars
self.ayum._conf = yumconf
+ self.ayum.doPluginSetup(plugin_types = (yum.plugins.TYPE_CORE, ),
+ searchpath = yum.config.StartupConf.pluginpath.default,
+ confpath = yum.config.StartupConf.pluginconfpath.default)
self.ayum.cleanMetadata() # clean metadata that might be in the cache from previous runs
If you want to compose a tree from multiple repositories
and, for example, you want a repository's contents to take precendence
over other packages, then you need some way to prioritize repos.
e.g. if you "forked" Fedora, changed the kernel and wanted to
build a tree consisting of Fedora and your kernel, even if the n-v-r
of your kernel package is older than that of the latest Fedora kernel.
The yum-priorities plugin supports this, and recently
pykickstart has grown support for specifying the priority of a repo:
repo --name=myrepo --baseurl=file:///my/repo --priority=0
repo --name=fedora --baseurl=file:///my/copy/of/fedora --priority=100
The following patches add support for priorities to pungi.
On Fri, 31 Aug 2007 17:00:46 +0100
Mark McLoughlin <markmc(a)redhat.com> wrote:
> An empty list of base classes wasn't allowed before Python 2.5 so
> remove it since it seems to be the only Python 2.5 feature being
So here is where I get a little curious. Much of the rest of pungi
relies upon specific APIs in things like yum, createrepo, anaconda,
pykickstart, etc.. Much of the requirements are on versions only
available on platforms that have python2.5. As such, making the tip of
pungi run on something other than python2.5 just seems bound to fail to
me. You /really/ don't want to be composing one release from another.
If you're going to compose FC6, you need to use the FC6 version of
pungi to do it. Mock can help.
The rest of the changes look fine and I'll add them shortly.
Curious what you're attempting to do with pungi on a < python2.5
platform... I'm certainly not thinking about backwards compat when
developing future versions of pungi to compose future versions of
Fedora -- All my bits are free, are yours?
Builds in mock on x86_64 fail for packages with buildrequires on
glib2-devel. Reported on EPEL 5.
The suggested fix is to add glib2-devel/glib-devel to the exclude list.
Question: is this something we want to apply for FC6/F7/et al?
PS: thanks to Jonathan Steffan for the report and suggested fix.