urlfetcher: Detect centos URLs as centos, not rhel variants

This commit is contained in:
Cole Robinson 2015-04-04 15:41:13 -04:00
parent d0c65b30a4
commit 393aed191e
2 changed files with 7 additions and 3 deletions

View File

@ -125,10 +125,10 @@ _add(OLD_CENTOS_URL % ("5.0", "x86_64"), name="centos-5.0")
_add(CENTOS_URL % ("5", "x86_64"), "rhel5.8", name="centos-5-latest", _add(CENTOS_URL % ("5", "x86_64"), "rhel5.8", name="centos-5-latest",
i686=CENTOS_URL % ("5", "i386")) i686=CENTOS_URL % ("5", "i386"))
# Latest centos 6 w/ i686 # Latest centos 6 w/ i686
_add(CENTOS_URL % ("6", "x86_64"), "rhel6.5", name="centos-6-latest", _add(CENTOS_URL % ("6", "x86_64"), "centos6.5", name="centos-6-latest",
i686=CENTOS_URL % ("6", "i386")) i686=CENTOS_URL % ("6", "i386"))
# Latest centos 7, but no i686 as of 2014-09-06 # Latest centos 7, but no i686 as of 2014-09-06
_add(CENTOS_URL % ("7", "x86_64"), "rhel7.0", name="centos-7-latest") _add(CENTOS_URL % ("7", "x86_64"), "centos7.0", name="centos-7-latest")
_set_distro(SLDistro) _set_distro(SLDistro)

View File

@ -795,7 +795,7 @@ class RHELDistro(RedHatDistro):
# CentOS distro check # CentOS distro check
class CentOSDistro(RHELDistro): class CentOSDistro(RHELDistro):
name = "CentOS" name = "CentOS"
urldistro = None urldistro = "centos"
def isValidStore(self): def isValidStore(self):
if not self._hasTreeinfo(): if not self._hasTreeinfo():
@ -805,6 +805,10 @@ class CentOSDistro(RHELDistro):
ret = (m is not None) ret = (m is not None)
if ret: if ret:
self._variantFromVersion() self._variantFromVersion()
if self.os_variant:
new_variant = self.os_variant.replace("rhel", "centos")
if self._check_osvariant_valid(new_variant):
self.os_variant = new_variant
return ret return ret