How to list sourceRPMs via yum

General support questions
Post Reply
yadav_01430
Posts: 8
Joined: 2020/11/14 00:37:37

How to list sourceRPMs via yum

Post by yadav_01430 » 2021/09/29 09:10:40

Is there any restriction in centos yum that we cannot list source RPMs via yum ?
I created this repo file.

cat postgres94.repo
[postgres94]
name=postgres94
baseurl=https://download.postgresql.org/pub/rep ... er-x86_64/
gpgcheck=0
enabled=1

It shows 515 RPMs present in yum repolist
yum repolist | grep -i postgres94
postgres94 postgres94 515

But when I do yum list, it will not list or install anything of those source RPMs.

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: How to list sourceRPMs via yum

Post by TrevorH » 2021/09/29 09:14:31

Yum doesn't deal with SRPMs. It doesn't know what to do with them.

What are you really trying to do?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

yadav_01430
Posts: 8
Joined: 2020/11/14 00:37:37

Re: How to list sourceRPMs via yum

Post by yadav_01430 » 2021/09/29 09:41:43

I was trying to list/download some source rpms from a link that has only source RPMs in that path.

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: How to list sourceRPMs via yum

Post by TrevorH » 2021/09/29 09:47:54

It doesn't work that way. What you need to do is create a separate repo named the same as the one that contains the binary RPMs but called originalname-Source and set that up as a separate stanza in your .repo file. Now you can e.g. use yumdownloader --source $package. All that does is allow you to download the source package based on the original name.

But generally speaking, SRPMs are totally different to binary ones and are treated differently and use different tools. There's no point in it doing so as they are for a different purpose and use specialised tools.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply