Update devstack-cache.py to install RPMs.
Change-Id: I952c0b474218552a98ad3f499fc0e7f3eba67e23
This commit is contained in:
parent
f7e77b8a1c
commit
5751c3a9e6
@ -73,12 +73,21 @@ def local_prep(distribution):
|
||||
run_local(['git', 'checkout', branch], cwd=DEVSTACK)
|
||||
run_local(['git', 'pull', '--ff-only', 'origin'], cwd=DEVSTACK)
|
||||
|
||||
debs = []
|
||||
debdir = os.path.join(DEVSTACK, 'files', 'apts')
|
||||
for fn in os.listdir(debdir):
|
||||
fn = os.path.join(debdir, fn)
|
||||
tokenize(fn, debs, distribution, comment='#')
|
||||
branch_data['debs'] = debs
|
||||
if os.path.exists('/usr/bin/apt-get'):
|
||||
debs = []
|
||||
debdir = os.path.join(DEVSTACK, 'files', 'apts')
|
||||
for fn in os.listdir(debdir):
|
||||
fn = os.path.join(debdir, fn)
|
||||
tokenize(fn, debs, distribution, comment='#')
|
||||
branch_data['debs'] = debs
|
||||
|
||||
if os.path.exists('/usr/bin/rpm'):
|
||||
rpms = []
|
||||
rpmdir = os.path.join(DEVSTACK, 'files', 'rpms')
|
||||
for fn in os.listdir(rpmdir):
|
||||
fn = os.path.join(rpmdir, fn)
|
||||
tokenize(fn, rpms, distribution, comment='#')
|
||||
branch_data['rpms'] = rpms
|
||||
|
||||
images = []
|
||||
for line in open(os.path.join(DEVSTACK, 'stackrc')):
|
||||
@ -111,6 +120,10 @@ def main():
|
||||
run_local(['sudo', 'apt-get', '-y', '-d', 'install'] +
|
||||
branch_data['debs'])
|
||||
|
||||
if branch_data['rpms']:
|
||||
run_local(['sudo', 'yum', 'install', '-y', '--downloadonly'] +
|
||||
branch_data['rpms'])
|
||||
|
||||
for url in branch_data['images']:
|
||||
fname = url.split('/')[-1]
|
||||
if fname in image_filenames:
|
||||
|
Loading…
Reference in New Issue
Block a user