LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Why isn't a package available in a repo? (https://www.linuxquestions.org/questions/linux-newbie-8/why-isn%27t-a-package-available-in-a-repo-4175499681/)

NotionCommotion 03-27-2014 11:05 AM

Why isn't a package available in a repo?
 
I am using priorities. I am trying to install git from the PUIAS repo. Why doesn't it show as available? Thank you
Code:

[root@michaels gitlab]# yum repolist
Loaded plugins: fastestmirror, priorities, security
Loading mirror speeds from cached hostfile
 * PUIAS_6_computational: puias.math.ias.edu
 * Webmin: download.webmin.com
 * base: centos.mirror.freedomvoice.com
 * epel: mirror.pnl.gov
 * extras: mirror.anl.gov
 * ius: mirror.sothatswhy.org.uk
 * updates: centos.sonn.com
595 packages excluded due to repository priority protections
repo id              repo name                                      status
PUIAS_6_computational PUIAS computational Base 6 - x86_64              1,975+487
Webmin                Webmin Distribution Neutral                            175
base                  CentOS-6 - Base                                      6,367
epel                  Extra Packages for Enterprise Linux 6 - x86_64  10,556+101
extras                CentOS-6 - Extras                                      14
ius                  IUS Community Packages for Enterprise Linux 6 -      257+2
updates              CentOS-6 - Updates                                    711
repolist: 20,055

[root@michaels gitlab]# cat /etc/yum.repos.d/PUIAS_6_computational.repo
[PUIAS_6_computational]
name=PUIAS computational Base $releasever - $basearch
mirrorlist=http://puias.math.ias.edu/data/puias/computational/$releasever/$basearch/mirrorlist
#baseurl=http://puias.math.ias.edu/data/puias/computational/$releasever/$basearch
enabled=1
priority=90
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puias

[root@michaels gitlab]# yum list all git
Loaded plugins: fastestmirror, priorities, security
Loading mirror speeds from cached hostfile
 * PUIAS_6_computational: puias.math.ias.edu
 * Webmin: download.webmin.com
 * base: centos.mirror.freedomvoice.com
 * epel: mirror.pnl.gov
 * extras: mirror.anl.gov
 * ius: mirror.sothatswhy.org.uk
 * updates: centos.sonn.com
595 packages excluded due to repository priority protections
Available Packages
git.x86_64                        1.7.1-3.el6_4.1                          base
[root@michaels gitlab]#


szboardstretcher 03-27-2014 11:16 AM

No mystery here. You have that repo set at priority 90,.. so the base repo set at priority 1 is overriding it.

Quote:

595 packages excluded due to repository priority protections
Generally what we do is use the yum enablerepo/disablerepo parameters to install a program from a specific repository, to avoid using priorities.

example output:

Code:

#yum --disablerepo=* --enablerepo=epel repolist
Loaded plugins: security
repo id                            repo name                                                                status
epel                              Extra Packages for Enterprise Linux 6 - x86_64                            10,657
repolist: 10,657


NotionCommotion 03-27-2014 11:41 AM

Thanks szboardstretcher, I obviously wasn't thinking.

I tried the following, but resulted in an error since git needed a dependency. Got around it by disabling priorities, but would like to know the proper way to do it.

Code:

yum --disablerepo=* --enablerepo=PUIAS_6_computational install git

szboardstretcher 03-27-2014 12:02 PM

Priorities works. It's not 'wrong' to use it. But, IMO, it becomes a real pain in the ass to keep it working correctly across 100+ servers.

But to find dependencies ahead of time,. you can install yum-utils, and use:

Code:

repoquery --requires packagename
Then enable and disable from there.

NotionCommotion 03-27-2014 12:26 PM

That sounds like a pain. I would have thought there would have been a way to specify a repository for a given package. Why not just for the few times you want to override your priorities, do as follows? Will this cause problems when upgrading?

Code:

yum --disableplugin=priorities install git


All times are GMT -5. The time now is 06:47 PM.