Modify 'starlingx' ref of feed ostree repo on controller

This commit modifies the 'starlingx' ref of feed ostree repo
on the controller to point to the active controller's
feed ostree repo. This ref is used by patching. After every
patch operation we run a patch sync where an ostree pull is
done on this ref to sync the feed ostree repos between both
the controllers.

Command:
ostree remote show-url starlingx
--repo=/var/www/pages/feed/rel-22.12/ostree_repo

Output:
http://controller:8080/feed/rel-22.12/ostree_repo/

Story: 2009969
Task: 46518
Signed-off-by: Jessica Castelino <jessica.castelino@windriver.com>
Change-Id: If58631c4053251d342f82d3dd523d03868acb6c3
This commit is contained in:
Jessica Castelino 2022-10-06 04:02:14 +00:00 committed by Al Bailey
parent dd5a24037d
commit 64f7c3420c
2 changed files with 12 additions and 0 deletions

View File

@ -2638,6 +2638,12 @@ if [ "${controller}" = true ] ; then
ilog "Replacing ostree sysroot remote with: ${file_feed} ${feed_branch}"
ostree --repo=/sysroot/ostree/repo remote delete ${instname}
ostree --repo=/sysroot/ostree/repo remote add ${instname} ${file_feed} ${feed_branch}
# Set feed ostree remote "starlingx" to point to active controller's feed ostree repo
feed_remote_name="starlingx"
feed_remote_url="http://controller:8080/feed/rel-22.12/ostree_repo/"
ilog "Replacing ostree feed remote with: ${feed_remote_url} ${feed_remote_name}"
ostree --repo=${repo} remote delete ${feed_remote_name}
ostree --repo=${repo} remote add ${feed_remote_name} ${feed_remote_url} ${feed_branch}
# This fetch is only needed once because the repo is stored in /var
set_variable "ostree_repo_fetched"

View File

@ -2197,6 +2197,12 @@ if [ "${controller}" = true ] ; then
ilog "Replacing ostree sysroot remote ${instname} with: ${file_feed} ${feed_branch}"
ostree --repo=/sysroot/ostree/repo remote delete ${instname}
ostree --repo=/sysroot/ostree/repo remote add ${instname} ${file_feed} ${feed_branch}
# Set feed ostree remote "starlingx" to point to active controller's feed ostree repo
feed_remote_name="starlingx"
feed_remote_url="http://controller:8080/feed/rel-22.12/ostree_repo/"
ilog "Replacing ostree feed remote with: ${feed_remote_url} ${feed_remote_name}"
ostree --repo=${repo} remote delete ${feed_remote_name}
ostree --repo=${repo} remote add ${feed_remote_name} ${feed_remote_url} ${feed_branch}
# This fetch is only needed once because the repo is stored in /var
set_variable "ostree_repo_fetched"