Update ostree summary
Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
This commit is contained in:
parent
cafa97566d
commit
a411fb57b3
1 changed files with 13 additions and 0 deletions
|
@ -107,9 +107,22 @@ def run_command(cmd):
|
||||||
shell=False)
|
shell=False)
|
||||||
|
|
||||||
|
|
||||||
|
def get_ostree_ref(repo, ref):
|
||||||
|
with open(os.path.join(repo, 'refs', 'heads', ref), 'w') as f:
|
||||||
|
return f.read().split()[0]
|
||||||
|
|
||||||
|
|
||||||
def sync_ostree(dst, ref):
|
def sync_ostree(dst, ref):
|
||||||
|
pre_commit = get_ostree_ref(dst, ref)
|
||||||
|
logger.info('Previous commit: %s', pre_commit)
|
||||||
cmd = ['ostree', 'pull-local', '--verbose', '--repo', dst, ATOMICSOURCE, ref]
|
cmd = ['ostree', 'pull-local', '--verbose', '--repo', dst, ATOMICSOURCE, ref]
|
||||||
out = run_command(cmd)
|
out = run_command(cmd)
|
||||||
|
logger.info('Ostree output: %s', out)
|
||||||
|
post_commit = get_ostree_ref(dst, ref)
|
||||||
|
logger.info('New commit: %s', post_commit)
|
||||||
|
if pre_commit != post_commit:
|
||||||
|
cmd = ['ostree', 'summary', '--verbose', '--repo', dst, '--update']
|
||||||
|
run_command(cmd)
|
||||||
|
|
||||||
|
|
||||||
def update_fullfilelist(modules):
|
def update_fullfilelist(modules):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue