ostbuild: make pull-components work
This builtin did not work for me. It did not initialize self.repo, it used the nonexisting parse_active_branch function unconditionally, and it did not actually find the list of components in contents.json. This commit fixes all three of these issues.
This commit is contained in:
parent
ae0b4ac628
commit
2ca6f04265
|
|
@ -43,10 +43,10 @@ class OstbuildPullComponents(builtins.Builtin):
|
||||||
parser.add_argument('targets', nargs='*')
|
parser.add_argument('targets', nargs='*')
|
||||||
|
|
||||||
args = parser.parse_args(argv)
|
args = parser.parse_args(argv)
|
||||||
|
self._init_repo()
|
||||||
self.parse_active_branch()
|
|
||||||
|
|
||||||
if len(args.targets) == 0:
|
if len(args.targets) == 0:
|
||||||
|
self.parse_active_branch()
|
||||||
targets = [self.active_branch]
|
targets = [self.active_branch]
|
||||||
else:
|
else:
|
||||||
targets = args.targets
|
targets = args.targets
|
||||||
|
|
@ -58,8 +58,8 @@ class OstbuildPullComponents(builtins.Builtin):
|
||||||
tree_contents_list.append(tree_contents)
|
tree_contents_list.append(tree_contents)
|
||||||
revisions = set()
|
revisions = set()
|
||||||
for tree_contents in tree_contents_list:
|
for tree_contents in tree_contents_list:
|
||||||
for content_item in tree_contents['contents']:
|
for component in tree_contents['components']:
|
||||||
revisions.add(content_item['ostree-revision'])
|
revisions.add('components/' + component)
|
||||||
args = ['ostree-pull', '--repo=' + self.repo]
|
args = ['ostree-pull', '--repo=' + self.repo]
|
||||||
# FIXME FIXME - don't hardcode origin here
|
# FIXME FIXME - don't hardcode origin here
|
||||||
args.append('gnome')
|
args.append('gnome')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue