yum + how to identify that all repo verified successfully
6,250
To make yum repolist
exit with a non-zero exit code on errors, you have to use verbose mode and use either
yum repolist -v
or
yum repoinfo
From the man page of yum
.
...One last special feature of repolist, is that if you are in non-verbose mode then yum will ignore any repo errors and output the information it can get...
Author by
yael
Updated on September 18, 2022Comments
-
yael over 1 year
I need yum cli command that can verifyed the helthcheck of all repo in my linux machine
I have try the yum repo but exit code still 0 ( IN SPITE WE HAVE ERROR )
yum repolist https://download.postgresql.org/pub/repos/yum/9.4/redhat/rhel-7Server-x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: ddownload.postgresql.org; Name or service not known" Trying other mirror. insr/primary_db | 23 kB 00:00:00 pkg/primary_db | 29 kB 00:00:00 local/primary_db | 3.6 MB 00:00:00 # echo $? 0
-
yael about 6 yearsnot answer on my question , I need cli to verify the repo ( like health check ) , we can do yum repolist all | grep -i errno , but this way not covered all problems
-
yael about 6 yearsok , but do you have solution to my previous question - unix.stackexchange.com/questions/428052/…
-