On Wed, 31 Aug 2011 10:09:40 -0500
Richard Shaw <hobbes1069(a)gmail.com> wrote:
On Wed, Aug 31, 2011 at 9:57 AM, stan <gryt2(a)q.com> wrote:
> On Wed, 31 Aug 2011 12:31:36 +0200
> suvayu ali <fatkasuvayu+linux(a)gmail.com> wrote:
>> On Wed, Aug 31, 2011 at 5:01 AM, stan <gryt2(a)q.com> wrote:
>> > as user, rpm -ivh the src.rpm package (you will have to get this
>> > manually from a repository)
>> $ yumdownloader --source <package>
> That's true if you are getting the package for the currently running
> system, and it is how I get src.rpm packages on F15. But doing
> that on F14 will not get an F15 package. The OP is running F14 and
> wants newer kernels. I didn't, however, check whether
> yumdownloader has an option like yum to set other repositories
> while dowloading. There could be, and in that case your suggestion
> will work with a little tweaking.
$ yumdownloader --releasever=15 --source <package>
Thanks for that. After your post I looked at the options for
yumdownloader, and it turns out it inherits options from yum, and this
is one of them. Here's what it says about that option:
Pretend the current release version is the given string.
This is very useful when combined with --installroot. Note that with
the default upstream cachedir, of /var/cache/yum, using this option
will corrupt your cache (and you can use $releasever in your
cachedir configuration to stop this).
Is it necessary to have the repo files for the desired repository
installed, or does it get them off the web in a one-off manner?
Do you know if a yum clean meta would clean up the cache corruption
after doing this?
Does this mean it is possible to update a non-running system by using
releasever and installroot? e.g. update F14 from F15
yum -y update --releasever=14 --installdir=<path to F14 root>