Skip to content

Commit

Permalink
Merge pull request #5716 from jkonecny12/master-add-runtime-deps-to-i…
Browse files Browse the repository at this point in the history
…nstall_dependencies

Add runtime deps to install_dependencies.sh
  • Loading branch information
KKoukiou authored Jun 20, 2024
2 parents f892277 + d2114a7 commit 6d5c36d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
- name: Check if rebuild of the container image is required
id: check-dockerfile-changed
run: |
changes=$(git diff $TARGET_BRANCH_NAME..HEAD -- dockerfile/anaconda-ci/ anaconda.spec.in scripts/testing/install_dependencies.sh)
changes=$(git diff $TARGET_BRANCH_NAME..HEAD -- dockerfile/anaconda-ci/ anaconda.spec.in)
# print for debugging
echo "$changes"
[ -z "$changes" ] || echo "changed=true" >> $GITHUB_OUTPUT
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
- name: Check if rebuild of the container image is required
id: check-dockerfile-changed
run: |
changes=$(git diff $TARGET_BRANCH_NAME..HEAD -- dockerfile/anaconda-ci/ anaconda.spec.in scripts/testing/install_dependencies.sh)
changes=$(git diff $TARGET_BRANCH_NAME..HEAD -- dockerfile/anaconda-ci/ anaconda.spec.in)
# print for debugging
echo "$changes"
[ -z "$changes" ] || echo "changed=true" >> $GITHUB_OUTPUT
Expand Down
8 changes: 6 additions & 2 deletions scripts/testing/install_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,13 @@ sed 's/@PACKAGE_VERSION@/0/; s/@PACKAGE_RELEASE@/0/; s/%{__python3}/python3/' ./
# get all build requires dependencies from the spec file and strip out version
# version could be problematic because of fedora version you are running and
# they are mostly not important for automake
deps=$(rpmspec -q --buildrequires $TEMP | sed 's/>=.*$//')
build_deps=$(rpmspec -q --buildrequires $TEMP | sed 's/>=.*$//')
# add also runtime dependencies for the local development
# remove anaconda packages and also '(glibc-langpack-en or glibc-all-langpacks)' which will fail otherwise
requires_deps=$(rpmspec -q --requires $TEMP | grep -v -E "(anaconda-|-widgets| or )" | sed 's/>=.*$//')

# shellcheck disable=SC2068
dnf install $@ $deps # do NOT quote the list or it falls apart
dnf install $@ $build_deps $requires_deps # do NOT quote the list or it falls apart

# clean up the temp file
rm $TEMP

0 comments on commit 6d5c36d

Please sign in to comment.