Red Hat Bugzilla – Bug 169219
allow overriding $basearch, $releasever from command line
Last modified: 2014-01-21 17:52:32 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (compatible; Konqueror/3.4; Linux) KHTML/3.4.2 (like Gecko)
Description of problem:
yum is very useful for creating nfs images, as in:
yum --installroot=/path/to/my/image groupinstall base
unfortunately, that doesn't work when creating an i386 image on an x86_64
machine, because yum takes $basearch from the host system (using dstroverpkg)
instead of the installed system (which doesn't exist yet).
a workaround is to replace $basearch with your favorite arch in the
repositories configuration, but of course we don't want to do that.
a similar problem occurs when creating an nfs image for, say, FC4, on an FC3
machine. again, yum will substitute the host machine's $releasever instead of
one solution would be to allow setting these variables from the command line:
yum --installroot=/path/to/my/image --basearch=i386 --releasever=4
Version-Release number of selected component (if applicable):
Steps to Reproduce:
Actual Results: N/A
Expected Results: N/A
you should be able to do most of this with a yum plugin. See the yum-utils
package for example of plugins.