On Wed, 8 Dec 2010, James Antill wrote:
On Tue, 2010-12-07 at 15:26 -0500, seth vidal wrote:
On Mon, 2010-12-06 at 20:57 -0500, Josh Boyer wrote:
Hi All,
I have been looking at the 'yum-ppc64-preferred.patch' in the RHEL6
yum package[1] lately, and I've been thinking about how to make this a
bit more configurable. I've not done much python coding and even less
yum coding, so I was hoping to get a few opinions on approaches to
make this suitable to upstream (maybe).
My initial thought was a yum plugin, however given that the code in
question is in the rpmUtils module and there are no slot points that I
can see that would allow similar modifications, I don't think that
will work. (Though I do see a FIXME in readMainConfig for basearch).
The next idea was to make a new config option in the core yum code
that would set the appropriate items and could be passed to the
getBestArch and getBaseArch functions. I added a similar option to
the Fedora mash tool, but it is specific to ppc64 (perfer_ppc64 is the
name). Would something like that be suitable, or would the option
need to be more generic so that it could work for sparc64 (or other
arches) as well?
Any direction would be appreciated.
okay the bestarch/basearch/compatarch stuff:
here's what has to happen - all of this needs to be in the archstorage
class. That way it can be redefined in runtime w/o worrying about what
it was elsewhere.
So the trick is going through yum and finding all the places we refer to
these functions and making them use similar results/items from
ArchStorage()
I think I'd be happy with a patch like that. It seems clean and
consistent w/what else we're doing.
James, what do you think?
Yeh, I'm fine with it ... although we then need some way to "configure"
the results. Which I guess we do around "yb.conf" init. time.
The other aspect with preferred architectures is that yum and rpm should
presumably be on sync. They use the preferred information in different
ways but things can get a bit bizarre if yum prefers 64bit and rpm
installs 32bit executables over 64bit ones (well, multilib is fairly
bizarre business anyway...)
So yum could just pick up the preferred multilib arch based on rpm's
config (which is "always prefer 64bit unless overridden in config", like
ppc used to do for quite a while). Or then yum should set the preferred
color in transactions, but if that's different with rpm's own
configuration things get even more bizarre if/when folks mix rpm and yum
usage.
- Panu -
_______________________________________________
Yum-devel mailing list
[email protected]
http://lists.baseurl.org/mailman/listinfo/yum-devel