revert config and add repo name check
This commit is contained in:
parent
e9e37384ae
commit
8f9f2646b7
@ -100,6 +100,12 @@ class RepoSync:
|
|||||||
self.gpgkey = gpgkey
|
self.gpgkey = gpgkey
|
||||||
self.checksum = rlvars['checksum']
|
self.checksum = rlvars['checksum']
|
||||||
|
|
||||||
|
# The repo name should be valid
|
||||||
|
if self.repo is not None:
|
||||||
|
if self.repo not in self.repos:
|
||||||
|
self.log.error(Color.FAIL + 'Invalid repository: ' + self.repo)
|
||||||
|
raise SystemExit()
|
||||||
|
|
||||||
self.compose_id = '{}-{}-{}'.format(
|
self.compose_id = '{}-{}-{}'.format(
|
||||||
config['shortname'],
|
config['shortname'],
|
||||||
rlvars['revision'],
|
rlvars['revision'],
|
||||||
@ -661,7 +667,7 @@ class RepoSync:
|
|||||||
"""
|
"""
|
||||||
fname = os.path.join(
|
fname = os.path.join(
|
||||||
dest_path,
|
dest_path,
|
||||||
"{}-config.repo".format(self.major_version)
|
"{}-{}-config.repo".format(self.shortname, self.major_version)
|
||||||
)
|
)
|
||||||
self.log.info('Generating the repo configuration: %s' % fname)
|
self.log.info('Generating the repo configuration: %s' % fname)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user