Skip to content

Commit

Permalink
Allow having only an overrides lockfile
Browse files Browse the repository at this point in the history
Right now, we ignore the override lockfile if a base lockfile isn't
present. This mostly works, but it prevents the case of bodhi-updates
where we want to override only some packages but leave the "base"
unlocked.

Tweak things so that both the base and override lockfiles can be used
independently.
  • Loading branch information
jlebon authored and openshift-merge-robot committed Mar 12, 2020
1 parent dc88a07 commit ddba66c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
13 changes: 6 additions & 7 deletions src/cmd-build
Original file line number Diff line number Diff line change
Expand Up @@ -182,14 +182,13 @@ EOF
prepare_git_artifacts "${configdir_gitrepo}" "${PWD}/coreos-assembler-config.tar.gz" "${PWD}/coreos-assembler-config-git.json"

lock_arg=
if [ -f "${manifest_lock}" ]; then
lock_arg="--ex-lockfile=${manifest_lock}"
echo -n "Building from lockfile ${manifest_lock}"
if [ -f "${manifest_lock_overrides}" ]; then
lock_arg="${lock_arg} --ex-lockfile=${manifest_lock_overrides}"
echo -n " and overrides ${manifest_lock_overrides}"
for lock in "${manifest_lock}" "${manifest_lock_overrides}"; do
if [ -f "${lock}" ]; then
lock_arg+=" --ex-lockfile=${lock}"
echo "Building from lockfile: ${manifest_lock}"
fi
echo
done
if [ -n "${lock_arg}" ]; then
sleep 1
fi

Expand Down
17 changes: 9 additions & 8 deletions src/cmd-fetch
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,16 @@ if [ -n "${UPDATE_LOCKFILE}" ]; then
echo "NB: ignoring overrides ${manifest_lock_overrides}"
sleep 1
fi
elif [ -f "${manifest_lock}" ]; then
args="--ex-lockfile=${manifest_lock}"
echo -n "Fetching RPMs from lockfile ${manifest_lock}"
if [ -f "${manifest_lock_overrides}" ]; then
args="${args} --ex-lockfile=${manifest_lock_overrides}"
echo -n " and overrides ${manifest_lock_overrides}"
else
for lock in "${manifest_lock}" "${manifest_lock_overrides}"; do
if [ -f "${lock}" ]; then
args+=" --ex-lockfile=${lock}"
echo "Fetching RPMs from lockfile: ${manifest_lock}"
fi
done
if [ -n "${args}" ]; then
sleep 1
fi
echo
sleep 1
fi

if [ -n "${DRY_RUN}" ]; then
Expand Down

0 comments on commit ddba66c

Please sign in to comment.