urlfetcher: Detect centos URLs as centos, not rhel variants
This commit is contained in:
parent
d0c65b30a4
commit
393aed191e
|
@ -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",
|
||||
i686=CENTOS_URL % ("5", "i386"))
|
||||
# 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"))
|
||||
# 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)
|
||||
|
|
|
@ -795,7 +795,7 @@ class RHELDistro(RedHatDistro):
|
|||
# CentOS distro check
|
||||
class CentOSDistro(RHELDistro):
|
||||
name = "CentOS"
|
||||
urldistro = None
|
||||
urldistro = "centos"
|
||||
|
||||
def isValidStore(self):
|
||||
if not self._hasTreeinfo():
|
||||
|
@ -805,6 +805,10 @@ class CentOSDistro(RHELDistro):
|
|||
ret = (m is not None)
|
||||
if ret:
|
||||
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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue