[ostree/easy-fixes: 4/4] ostbuild: make pull-components work
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree/easy-fixes: 4/4] ostbuild: make pull-components work
- Date: Sun, 6 May 2012 02:41:33 +0000 (UTC)
commit 1c2d62a3564dfa5b47119347983807d418e09c13
Author: Matthias Clasen <mclasen redhat com>
Date: Sat May 5 22:40:03 2012 -0400
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.
src/ostbuild/pyostbuild/builtin_pull_components.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/ostbuild/pyostbuild/builtin_pull_components.py b/src/ostbuild/pyostbuild/builtin_pull_components.py
index 7464b1e..f7a3d7b 100755
--- a/src/ostbuild/pyostbuild/builtin_pull_components.py
+++ b/src/ostbuild/pyostbuild/builtin_pull_components.py
@@ -39,14 +39,14 @@ class OstbuildPullComponents(builtins.Builtin):
builtins.Builtin.__init__(self)
def execute(self, argv):
+ self._init_repo()
parser = argparse.ArgumentParser(description=self.short_description)
parser.add_argument('targets', nargs='*')
args = parser.parse_args(argv)
- self.parse_active_branch()
-
if len(args.targets) == 0:
+ self.parse_active_branch()
targets = [self.active_branch]
else:
targets = args.targets
@@ -58,8 +58,8 @@ class OstbuildPullComponents(builtins.Builtin):
tree_contents_list.append(tree_contents)
revisions = set()
for tree_contents in tree_contents_list:
- for content_item in tree_contents['contents']:
- revisions.add(content_item['ostree-revision'])
+ for component in tree_contents['components']:
+ revisions.add('components/' + component)
args = ['ostree-pull', '--repo=' + self.repo]
# FIXME FIXME - don't hardcode origin here
args.append('gnome')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]