[CentOS] After 5.1 update $releasever is still 5

Bernard Lheureux bernard.lheureux at bbsoft4.org
Sun Dec 16 16:40:57 UTC 2007


On Sun, 2007-12-16 at 06:58 -0600, Johnny Hughes wrote:

But in the 4.xx version when you do a 'cat /etc/redhat-release' it shows
you the version "CentOS release 4.5 (Final)" for example, now with
version 5 after the upgrade to version 5.1 if you do a
'cat /etc/redhat-release' it always shows "CentOS release 5 (Final)" and
not "CentOS release 5.1 (Final)"

> Robert Moskowitz wrote:
> > I have performed the 5.1 update via the 5 repo on a couple of systems. 
> > I then went to switch these systems to my new local repo using ther
> > $releasever variable.  It still has the value of 5, not 5.1
> > 
> > Where is this set?  Why was it not changed to 5.1?
> >
> 
> Just to answer this "technical question" ...
> 
> $releasever is obtained by getting the release string from a package
> that is defined in the yum.conf file.
> 
> The package is set with this variable in yum.conf:
> 
> distroverpkg=
> 
> In the case of centos, that variable is either centos-release or
> /etc/redhat-release.
> 
> You can see what the $releasever is with this command:
> 
> rpm -q --qf '%{VERSION}\n' centos-release
> 
> OR
> 
> rpm -q --qf '%{VERSION}\n' `rpm -q --whatprovides /etc/redhat-release`
> 
> (Both of these will work, and one is used, depending on the value of
> distroverpkg= in /etc/yum.conf)
> 
> Every release of CentOS-3.x, CentOS-4.x, and CentOS-5.x has ALWAYS had
> 3, 4, or 5 as the $releasever.  We control WHAT /4/ or /5/ is (as a
> symlink) so that we set the "Current Version" by pointing 4 to 4.5 or
> 4.6 and 5 to 5.0 or 5.1.  We have been doing this for 4 years.
> 
> We have NEVER had 3.5, 4.5, 5.1, etc. as a $releasever.
> 
> We MAY have a 5.1 or 4.6 as a release version for people who want to
> stay on a point release (after a new version is available) as the
> upstream provider releases their "z stream" releases later.  We may also
> just provide CentOS-Base.repo files as replacement files that have hard
> coded versions in place.
> 
> Keep in mind that other (3rd party) sites use 3, 4, 5 in their .repo
> files for centos ... and if we change this (to 4.6 or 5.1), it will
> possibly break their repos on your system until they take action to make
> 5.1 or 4.6 work on their server, or until you edit THEIR .repo files and
> make changes.
> 
> 
> 
> > On the one clean install from the 5.1 isos, $releasever is at 5.1   I
> > think.
> 
> 
> Thanks,
> Johnny Hughes
> 
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
-- 
 M$-Internet Exploder est le cancer de l'Internet, voyez pourquoi ici :
 http://www.aful.org/ressources/documentations/msie-problemes-securite/

--
(°-   Bernard Lheureux Gestionnaire des MailingLists ML, TechML, LinuxML
//\   http://www.bbsoft4.org/Mailinglists.htm ** MailTo:root at bbsoft4.org
v_/_  http://www.bbsoft4.org/ <<<<<< () >>>>>> http://www.portalinux.org




More information about the CentOS mailing list