From fcfeaae71f7e50350ecf30c90aaf7214927523df Mon Sep 17 00:00:00 2001 From: Sjoerd Simons Date: Mon, 31 Jul 2017 15:01:25 +0200 Subject: [PATCH] Hack around ostree incorrectly configuring repository When getting a repository from ostree via the OstreeSysroot object some extra information is stashed in place which seems to confused ostree_repo_add_remote causing it to put the remote configuration in /etc (as opposed to the repository itself). While the proper fix should be in ostree, this allows us to get around it for now Signed-off-by: Sjoerd Simons --- ostree_deploy_action.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ostree_deploy_action.go b/ostree_deploy_action.go index 41357db..0ffc0ef 100644 --- a/ostree_deploy_action.go +++ b/ostree_deploy_action.go @@ -34,7 +34,11 @@ func (ot *OstreeDeployAction) Run(context *YaibContext) { log.Fatalf("%s", err) } - dstRepo, err := sysroot.Repo(nil) + /* HACK: Getting the repository form the sysroot gets ostree confused on + * whether it should configure /etc/ostree or the repo configuration, + so reopen by hand */ + /* dstRepo, err := sysroot.Repo(nil) */ + dstRepo, err = ostree.OpenRepo(path.Join(context.imageMntDir, "ostree/repo")) if err != nil { log.Fatalf("%s", err) }