I have a number of CentOS instances, some of which have been used by developers and have 3rd party repos (sometimes their own) enabled. However from an administrative point of view it is handy to be able to force through an update in a script without messing with the local yum.conf, or parsing the output or yum.repos.d to see which is the offending broken repo.
It looks like the developers had an eye for thisn with this option;
-t, --tolerant
but clearly this was more of a challenge than they had anticipated because in man page;
This option currently does nothing.
Obviously when I am doing this manually, I can work-around the repos with;
yum --disablerepo=broken-repo deplist mypackage
and to make a scripted update more robust, I can use (which at least definitely installs distro updates)
yum -y --disablerepo=* --enablerepo=updates update
but this doesn't catch the case where there is EPEL, or rpmforge, or rbel, or some package distributor which I would have to parse the yum.repos.d file first for.
This script can help somewhat:
It works by getting a list of repositories with
yum repolist
, selecting repository names from output usingawk
and then trying to update all of them one at the time.It is not 100% reliable, as it depends on unchanging yum output format. Also if update needs to install another package from different repository and there is a broken repository then it will fail anyway — but I suppose it is not so common.