Skip to content

Commit

Permalink
Remove all refs from extracted ostree commit except the desired
Browse files Browse the repository at this point in the history
FCOS now adds a tag for the version, which confuses bootstrap (it expects a single ref)
  • Loading branch information
vrutkovs committed Nov 21, 2020
1 parent c7c9809 commit e7e11c4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ commit_id="$( <${dir}/meta.json jq -r '."ostree-commit"' )"
mkdir /srv/repo
curl -L "${tar_url}" | tar xf - -C /srv/repo/ --no-same-owner

# Remove all refs except ${REF} so that bootstrap pivot would not be confused
ostree --repo=/srv/repo refs | grep -v "${REF}" | xargs -n1 ostree --repo=/srv/repo refs --delete

# use repos from FCOS
rm -rf /etc/yum.repos.d
ostree --repo=/srv/repo checkout "${REF}" --subpath /usr/etc/yum.repos.d --user-mode /etc/yum.repos.d
Expand Down

0 comments on commit e7e11c4

Please sign in to comment.