Skip to content

Commit

Permalink
Merge pull request #1088 from SUSE/gcc_container
Browse files Browse the repository at this point in the history
Fix symlinks in gcc container
  • Loading branch information
dcermak authored May 7, 2024
2 parents cedac80 + 159c5b0 commit 109fa90
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/bci_build/package/gcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def _is_main_gcc(os_version: OsVersion, gcc_version: _GCC_VERSIONS) -> bool:
(gcc_pkg := f"gcc{gcc_version}"),
(gpp := f"{gcc_pkg}-c++"),
"make",
"gawk",
]
+ (["gcc", "gcc-c++"] if _is_main_gcc(os_version, gcc_version) else [])
),
Expand All @@ -67,7 +68,7 @@ def _is_main_gcc(os_version: OsVersion, gcc_version: _GCC_VERSIONS) -> bool:
rf"""# symlink all versioned gcc & g++ binaries to unversioned
# ones in /usr/local/bin so that plain gcc works
{DOCKERFILE_RUN} for gcc_bin in $(rpm -ql {gcc_pkg} {gpp} |grep ^/usr/bin/ ); do \
ln -f $gcc_bin $(echo "$gcc_bin" | sed -e 's|/usr/bin/|/usr/local/bin/|' -e 's|-{gcc_version}$||'); \
ln -sf $gcc_bin $(echo "$gcc_bin" | sed -e 's|/usr/bin/|/usr/local/bin/|' -e 's|-{gcc_version}$||'); \
done
"""
if not _is_main_gcc(os_version, gcc_version)
Expand Down

0 comments on commit 109fa90

Please sign in to comment.