Merge pull request #12144 from hulu/genesis-fixes

minor genesis module fixes
This commit is contained in:
Joseph Hall 2014-04-18 20:43:17 -06:00
commit f34dc6dadb

View File

@ -32,8 +32,14 @@ def __virtual__():
return True
def bootstrap(platform, root, img_format='dir', fs_format='ext2', arch=None,
flavor=None, repo_url=None, static_qemu=None):
def bootstrap(platform,
root,
img_format='dir',
fs_format='ext2',
arch=None,
flavor=None,
repo_url=None,
static_qemu=None):
'''
Create an image for a specific platform.
@ -100,7 +106,7 @@ def bootstrap(platform, root, img_format='dir', fs_format='ext2', arch=None,
return _bootstrap_yum(root)
elif platform == 'deb':
return _bootstrap_deb(
root, arch=arch, flavor=flavor, static_qemu=static_qemu
root, arch=arch, flavor=flavor, repo_url=repo_url, static_qemu=static_qemu
)
elif platform == 'pacman':
return _bootstrap_pacman(root)
@ -133,7 +139,7 @@ def _bootstrap_deb(
root,
arch,
flavor,
repo_url='http://ftp.debian.org/debian/',
repo_url=None,
static_qemu=None
):
'''
@ -158,6 +164,9 @@ def _bootstrap_deb(
(e.x.: /usr/bin/qemu-amd64-static)
'''
if repo_url is None:
repo_url = 'http://ftp.debian.org/debian/'
__salt__['cmd.run'](
'debootstrap --foreign --arch {arch} {flavor} {root} {url}'.format(
arch=arch, flavor=flavor, root=root, url=repo_url