Correct name of source archive if reference contains '/'

If we have reference like stable/kilo name of source archive
will contain only last part of reference. We should replace '/'
with '-' to have full name. This is useful for correct
identification of source code afterwards.

Change-Id: I1ff1015e3f7926110d0fcb59504e58a5e80a75f9
Closes-Bug: #1492279
This commit is contained in:
Vladislav Belogrudov 2015-09-04 17:47:35 +03:00
parent e569d80182
commit 34cbe82e6e

View File

@ -106,7 +106,8 @@ class WorkerThread(Thread):
return
elif source.get('type') == 'git':
clone_dir = dest_archive + '-' + source['reference']
clone_dir = '{}-{}'.format(dest_archive,
source['reference'].replace('/', '-'))
try:
LOG.debug("{}:Cloning from {}".format(image['name'],
source['source']))