[patch 1/3] Enable yum plugins
by Mark McLoughlin
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.
Possible alternatives:
- add some way to make yum load a specific plugin with a
specific configuration
- 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>
Index: pungi/pypungi/gather.py
===================================================================
--- pungi.orig/pypungi/gather.py
+++ pungi/pypungi/gather.py
@@ -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.repos.setCacheDir(self.ayum.conf.cachedir)
self.ayum.cleanMetadata() # clean metadata that might be in the cache from previous runs
--
16 years, 7 months
[patch 0/3] Support repo priorities
by Mark McLoughlin
Hi,
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.
Cheers,
Mark.
--
16 years, 7 months
Re: [patch 1/4] Remove Python 2.5 usage
by Jesse Keating
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
> used.
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...
--
Jesse Keating
Fedora -- All my bits are free, are yours?
16 years, 7 months