2

I'm trying to set up a really simple local repo. I want to have a basic repo with two versions of only one rpm, so I did:

mkdir /packages/x64

copy two rpms to /packages/x64

[root@repo x64]# createrepo --verbose /packages/x64
1/2 - jre-6u37-linux-amd64.rpm
2/2 - jre-7u9-linux-x64.rpm

Saving Primary metadata Saving file lists metadata Saving other metadata

Added the repo to /etc/yum.repos.d/local.repo

But when I do:

[root@repo x64]# yum list jre

I get:

Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
Available Packages
jre.x86_64  1.7.0_09-fcs  local

ie it only shows the latest version. I know that they're both in the repo because I've run this:

[root@repo x64]# rpm -qp jre-6u37-linux-amd64.rpm
jre-1.6.0_37-fcs.x86_64
[root@repo x64]# rpm -qp jre-7u9-linux-x64.rpm 
jre-1.7.0_09-fcs.x86_64

and when I remove the latter version, and run createrepo again, the former shows up. Most puzzling, what am I missing?

1 Answer 1

3

The command you're looking for is:

yum --showduplicates list jre

That should give you a list of priors.

yum list kernel

Available Packages
kernel.x86_64                                        2.6.32-279.14.1.el6                                         updates

And...

yum --showduplicates list kernel

Available Packages
kernel.x86_64                                        2.6.32-279.el6                                              base                                    
kernel.x86_64                                        2.6.32-279.1.1.el6                                          updates                                 
kernel.x86_64                                        2.6.32-279.2.1.el6                                          updates                                 
kernel.x86_64                                        2.6.32-279.5.1.el6                                          updates                                 
kernel.x86_64                                        2.6.32-279.5.2.el6                                          updates                                 
kernel.x86_64                                        2.6.32-279.9.1.el6                                          updates                                 
kernel.x86_64                                        2.6.32-279.11.1.el6                                         updates                                 
kernel.x86_64                                        2.6.32-279.14.1.el6                                         updates       

By default, yum won't show you ALL available packages. As far as it's concerned, the jre package has two versions, of which 1.7.0 is the newest so that's all it shows without being told.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .