-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(ruby): Make coinstallable #35742
Conversation
cb66df9
to
0375f52
Compare
9e5f587
to
e0657c0
Compare
Gen AI suggestions to solve the build error: Based on the build error, let me analyze and provide a solution: • Detected Error: • Error Category: Configuration • Failure Point: The symlink creation step in the ruby-3.1-base subpackage pipeline • Root Cause Analysis: The error occurs when trying to create symbolic links for Ruby binaries. The script is attempting to create links that already exist, likely due to multiple binary files being linked to the same destination. • Suggested Fix: Modify the symlink creation loop in the ruby-3.1-base subpackage pipeline to handle existing files: - name: "${{package.name}}-base"
description: "Ruby ${{vars.major-minor-version}} base"
pipeline:
- runs: |
mkdir -p ${{targets.contextdir}}
mv ${{targets.destdir}}/* ${{targets.contextdir}}
mkdir -p ${{targets.destdir}}/usr/bin
mkdir -p ${{targets.contextdir}}/usr/bin
for bin in ${{targets.contextdir}}/usr/libexec/ruby/${{vars.stdlib-version}}/*; do
bn="$(basename $bin)"
ln -sf /usr/libexec/ruby/${{vars.stdlib-version}}/$bn ${{targets.destdir}}/usr/bin/
ln -sf /usr/libexec/ruby/${{vars.stdlib-version}}/$bn ${{targets.contextdir}}/usr/bin/$bn${{vars.major-minor-version}}
done • Explanation:
• Additional Notes:
• References:
|
Gen AI suggestions to solve the build error: • Detected Error: "ln: /home/build/melange-out/ruby-3.1-base/usr/bin/.1: File exists" • Error Category: Configuration • Failure Point: Symbolic link creation in ruby-3.1-base subpackage pipeline • Root Cause Analysis: The error occurs during the symlink creation step where it's trying to create links that already exist, likely due to multiple symlinks being created for the same target. • Suggested Fix: Modify the symlink creation logic in the subpackage pipeline to handle existing files: subpackages:
- name: "${{package.name}}-base"
description: "Ruby ${{vars.major-minor-version}} base"
pipeline:
- runs: |
mkdir -p ${{targets.contextdir}}
mv ${{targets.destdir}}/* ${{targets.contextdir}}
mkdir -p ${{targets.destdir}}/usr/bin
mkdir -p ${{targets.contextdir}}/usr/bin
for bin in ${{targets.contextdir}}/usr/libexec/ruby/${{vars.stdlib-version}}/*; do
bn="$(basename $bin)"
ln -sf /usr/libexec/ruby/${{vars.stdlib-version}}/$bn ${{targets.destdir}}/usr/bin/ || true
ln -sf /usr/libexec/ruby/${{vars.stdlib-version}}/$bn ${{targets.contextdir}}/usr/bin/$bn${{vars.major-minor-version}} || true
done • Explanation:
• Additional Notes:
• References:
|
Gen AI suggestions to solve the build error: • Detected Error: • Error Category: Build Configuration • Failure Point: Symbolic link creation in ruby-3.1-base subpackage pipeline • Root Cause Analysis: The error occurs during the symlink creation step in the ruby-3.1-base subpackage pipeline. The build is attempting to create symbolic links that already exist, likely due to duplicate link creation attempts. • Suggested Fix: Modify the symlink creation logic in the ruby-3.1-base subpackage pipeline to check for existing links: - name: "${{package.name}}-base"
description: "Ruby ${{vars.major-minor-version}} base"
pipeline:
- runs: |
mkdir -p ${{targets.contextdir}}
mv ${{targets.destdir}}/* ${{targets.contextdir}}
mkdir -p ${{targets.destdir}}/usr/bin
mkdir -p ${{targets.contextdir}}/usr/bin
for bin in ${{targets.contextdir}}/usr/libexec/ruby/${{vars.stdlib-version}}/*; do
bn="$(basename $bin)"
ln -sf /usr/libexec/ruby/${{vars.stdlib-version}}/$bn ${{targets.destdir}}/usr/bin/
ln -sf /usr/libexec/ruby/${{vars.stdlib-version}}/$bn ${{targets.contextdir}}/usr/bin/$bn${{vars.major-minor-version}}
done • Explanation:
• Additional Notes:
• References:
|
Gen AI suggestions to solve the build error: Based on the error output, I'll analyze and provide a solution: • Detected Error: "ln: /home/build/melange-out/ruby-3.1-base/usr/bin/.1: File exists" • Error Category: Configuration/Pipeline • Failure Point: Symbolic link creation in the ruby-3.1-base subpackage pipeline • Root Cause Analysis: • Suggested Fix: - name: "${{package.name}}-base"
description: "Ruby ${{vars.major-minor-version}} base"
pipeline:
- runs: |
mkdir -p ${{targets.contextdir}}
# Clean move all contents
mv ${{targets.destdir}}/* ${{targets.contextdir}}
# Ensure clean directory state
rm -rf ${{targets.destdir}}/usr/bin
mkdir -p ${{targets.destdir}}/usr/bin
mkdir -p ${{targets.contextdir}}/usr/bin
# Create symlinks with explicit checks
for bin in ${{targets.contextdir}}/usr/libexec/ruby/${{vars.stdlib-version}}/*; do
bn="$(basename $bin)"
if [ ! -e "${{targets.destdir}}/usr/bin/$bn" ]; then
ln -s /usr/libexec/ruby/${{vars.stdlib-version}}/$bn ${{targets.destdir}}/usr/bin/$bn
fi
if [ ! -e "${{targets.contextdir}}/usr/bin/$bn${{vars.major-minor-version}}" ]; then
ln -s /usr/libexec/ruby/${{vars.stdlib-version}}/$bn ${{targets.contextdir}}/usr/bin/$bn${{vars.major-minor-version}}
fi
done • Explanation:
• Additional Notes:
• References:
|
Gen AI suggestions to solve the build error: Based on the error output, I'll analyze and provide a solution: • Detected Error: • Error Category: Configuration • Failure Point: Symbolic link creation during ruby-3.1-base subpackage pipeline • Root Cause Analysis: The error occurs during the symlink creation step in the ruby-3.1-base subpackage pipeline. The issue appears to be an attempt to create duplicate symbolic links or a collision in the link targets. • Suggested Fix: - name: "${{package.name}}-base"
description: "Ruby ${{vars.major-minor-version}} base"
pipeline:
- runs: |
mkdir -p ${{targets.contextdir}}
mv ${{targets.destdir}}/* ${{targets.contextdir}}
mkdir -p ${{targets.destdir}}/usr/bin
mkdir -p ${{targets.contextdir}}/usr/bin
# Add removal of existing links
rm -f ${{targets.destdir}}/usr/bin/*
rm -f ${{targets.contextdir}}/usr/bin/*
for bin in ${{targets.contextdir}}/usr/libexec/ruby/${{vars.stdlib-version}}/*; do
bn="$(basename $bin)"
ln -sf /usr/libexec/ruby/${{vars.stdlib-version}}/$bn ${{targets.destdir}}/usr/bin/
ln -sf /usr/libexec/ruby/${{vars.stdlib-version}}/$bn ${{targets.contextdir}}/usr/bin/$bn${{vars.major-minor-version}}
done • Explanation:
• Additional Notes:
• References:
|
Gen AI suggestions to solve the build error: • Detected Error: • Error Category: Configuration • Failure Point: Symbolic link creation in ruby-3.1-base subpackage pipeline • Root Cause Analysis: The error occurs during the creation of symbolic links in the subpackage pipeline. The issue appears to be caused by an attempt to create a duplicate symbolic link or the target directory already containing links. • Suggested Fix: Modify the subpackage pipeline to handle existing files: - name: "${{package.name}}-base"
description: "Ruby ${{vars.major-minor-version}} base"
pipeline:
- runs: |
mkdir -p ${{targets.contextdir}}
mv ${{targets.destdir}}/* ${{targets.contextdir}}
mkdir -p ${{targets.destdir}}/usr/bin
mkdir -p ${{targets.contextdir}}/usr/bin
for bin in ${{targets.contextdir}}/usr/libexec/ruby/${{vars.stdlib-version}}/*; do
bn="$(basename $bin)"
ln -sf /usr/libexec/ruby/${{vars.stdlib-version}}/$bn ${{targets.destdir}}/usr/bin/
ln -sf /usr/libexec/ruby/${{vars.stdlib-version}}/$bn ${{targets.contextdir}}/usr/bin/$bn${{vars.major-minor-version}}
done • Explanation: Adding the -f flag to ln commands will force the creation of symbolic links even if the target already exists. This prevents the error when links may already be present while ensuring the correct links are established. • Additional Notes:
• References:
|
Gen AI suggestions to solve the build error: • Detected Error: • Error Category: Configuration • Failure Point: Symbolic link creation in ruby-3.1-base subpackage pipeline • Root Cause Analysis: The error occurs during the creation of symbolic links in the subpackage pipeline. The issue appears to be an attempt to create a symbolic link that already exists, likely due to multiple links being created for the same target. • Suggested Fix: - name: "${{package.name}}-base"
description: "Ruby ${{vars.major-minor-version}} base"
pipeline:
- runs: |
mkdir -p ${{targets.contextdir}}
mv ${{targets.destdir}}/* ${{targets.contextdir}}
mkdir -p ${{targets.destdir}}/usr/bin
mkdir -p ${{targets.contextdir}}/usr/bin
# Add check to avoid duplicate symlinks
for bin in ${{targets.contextdir}}/usr/libexec/ruby/${{vars.stdlib-version}}/*; do
bn="$(basename $bin)"
if [ ! -e "${{targets.destdir}}/usr/bin/$bn" ]; then
ln -s /usr/libexec/ruby/${{vars.stdlib-version}}/$bn ${{targets.destdir}}/usr/bin/$bn
fi
if [ ! -e "${{targets.contextdir}}/usr/bin/$bn${{vars.major-minor-version}}" ]; then
ln -s /usr/libexec/ruby/${{vars.stdlib-version}}/$bn ${{targets.contextdir}}/usr/bin/$bn${{vars.major-minor-version}}
fi
done • Explanation: The modified script adds checks before creating symbolic links to prevent attempts to create duplicate links. This should resolve the "File exists" error while maintaining the required functionality. • Additional Notes:
• References:
|
Gen AI suggestions to solve the build error: • Detected Error: • Error Category: Configuration • Failure Point: Symlink creation during ruby-3.1-base subpackage pipeline • Root Cause Analysis: The error occurs during the symlink creation step in the ruby-3.1-base subpackage pipeline where it's trying to create symbolic links for Ruby binaries but encountering existing files • Suggested Fix: - name: "${{package.name}}-base"
pipeline:
- runs: |
mkdir -p ${{targets.contextdir}}
mv ${{targets.destdir}}/* ${{targets.contextdir}}
mkdir -p ${{targets.destdir}}/usr/bin
mkdir -p ${{targets.contextdir}}/usr/bin
for bin in ${{targets.contextdir}}/usr/libexec/ruby/${{vars.stdlib-version}}/*; do
bn="$(basename $bin)"
ln -sf /usr/libexec/ruby/${{vars.stdlib-version}}/$bn ${{targets.destdir}}/usr/bin/
ln -sf /usr/libexec/ruby/${{vars.stdlib-version}}/$bn ${{targets.contextdir}}/usr/bin/$bn${{vars.major-minor-version}}
done • Explanation:
• Additional Notes:
• References:
|
Gen AI suggestions to solve the build error: • Detected Error: • Error Category: Configuration • Failure Point: Symlink creation in ruby-3.1-base subpackage pipeline • Root Cause Analysis: The error occurs during the symlink creation step in the ruby-3.1-base subpackage pipeline. It's trying to create a symlink that already exists, likely due to the way the binary links are being created. • Suggested Fix: Modify the symlink creation logic in the ruby-3.1-base subpackage pipeline to handle existing files: - name: "${{package.name}}-base"
description: "Ruby ${{vars.major-minor-version}} base"
pipeline:
- runs: |
mkdir -p ${{targets.contextdir}}
mv ${{targets.destdir}}/* ${{targets.contextdir}}
mkdir -p ${{targets.destdir}}/usr/bin
mkdir -p ${{targets.contextdir}}/usr/bin
for bin in ${{targets.contextdir}}/usr/libexec/ruby/${{vars.stdlib-version}}/*; do
bn="$(basename $bin)"
ln -sf /usr/libexec/ruby/${{vars.stdlib-version}}/$bn ${{targets.destdir}}/usr/bin/
ln -sf /usr/libexec/ruby/${{vars.stdlib-version}}/$bn ${{targets.contextdir}}/usr/bin/$bn${{vars.major-minor-version}}
done • Explanation: Adding the • Additional Notes:
• References:
|
Gen AI suggestions to solve the build error: • Detected Error: "ln: /home/build/melange-out/ruby-3.1-base/usr/bin/.1: File exists" • Error Category: Build Configuration • Failure Point: Symbolic link creation in the ruby-3.1-base subpackage pipeline • Root Cause Analysis: The error occurs during the symbolic link creation step where it's trying to create links that already exist. This typically happens when the link targets are being created multiple times or there's a collision in the link creation process. • Suggested Fix: Modify the subpackage pipeline to ensure clean link creation: - name: "${{package.name}}-base"
description: "Ruby ${{vars.major-minor-version}} base"
pipeline:
- runs: |
mkdir -p ${{targets.contextdir}}
mv ${{targets.destdir}}/* ${{targets.contextdir}}
mkdir -p ${{targets.destdir}}/usr/bin
mkdir -p ${{targets.contextdir}}/usr/bin
for bin in ${{targets.contextdir}}/usr/libexec/ruby/${{vars.stdlib-version}}/*; do
bn="$(basename $bin)"
ln -sf /usr/libexec/ruby/${{vars.stdlib-version}}/$bn ${{targets.destdir}}/usr/bin/$bn
ln -sf /usr/libexec/ruby/${{vars.stdlib-version}}/$bn ${{targets.contextdir}}/usr/bin/$bn${{vars.major-minor-version}}
done • Explanation:
• Additional Notes:
• References:
|
Gen AI suggestions to solve the build error: Based on the error log, I'll analyze and provide a solution: • Detected Error: "ln: /home/build/melange-out/ruby-3.1-base/usr/bin/.1: File exists" • Error Category: Configuration/Pipeline • Failure Point: Symbolic link creation in the ruby-3.1-base subpackage pipeline • Root Cause Analysis: The error occurs during the symbolic link creation step where it's trying to create links that already exist, suggesting a collision in the symlink creation process • Suggested Fix: Modify the symlink creation logic in the subpackage pipeline to handle existing files: - name: "${{package.name}}-base"
description: "Ruby ${{vars.major-minor-version}} base"
pipeline:
- runs: |
mkdir -p ${{targets.contextdir}}
mv ${{targets.destdir}}/* ${{targets.contextdir}}
mkdir -p ${{targets.destdir}}/usr/bin
mkdir -p ${{targets.contextdir}}/usr/bin
for bin in ${{targets.contextdir}}/usr/libexec/ruby/${{vars.stdlib-version}}/*; do
bn="$(basename $bin)"
ln -sf /usr/libexec/ruby/${{vars.stdlib-version}}/$bn ${{targets.destdir}}/usr/bin/
ln -sf /usr/libexec/ruby/${{vars.stdlib-version}}/$bn ${{targets.contextdir}}/usr/bin/$bn${{vars.major-minor-version}}
done • Explanation:
• Additional Notes:
• References:
|
Gen AI suggestions to solve the build error: • Detected Error: • Error Category: Configuration • Failure Point: Subpackage pipeline for ruby-3.1-base during symlink creation • Root Cause Analysis: The error occurs during the symlink creation step in the ruby-3.1-base subpackage pipeline. The script is attempting to create symbolic links but encountering existing files, likely due to duplicate link creation attempts. • Suggested Fix: Modify the symlink creation logic in the ruby-3.1-base subpackage pipeline to handle existing files: - name: "${{package.name}}-base"
description: "Ruby ${{vars.major-minor-version}} base"
pipeline:
- runs: |
mkdir -p ${{targets.contextdir}}
mv ${{targets.destdir}}/* ${{targets.contextdir}}
mkdir -p ${{targets.destdir}}/usr/bin
mkdir -p ${{targets.contextdir}}/usr/bin
for bin in ${{targets.contextdir}}/usr/libexec/ruby/${{vars.stdlib-version}}/*; do
bn="$(basename $bin)"
ln -sf /usr/libexec/ruby/${{vars.stdlib-version}}/$bn ${{targets.destdir}}/usr/bin/
ln -sf /usr/libexec/ruby/${{vars.stdlib-version}}/$bn ${{targets.contextdir}}/usr/bin/$bn${{vars.major-minor-version}}
done • Explanation:
• Additional Notes:
• References:
|
Gen AI suggestions to solve the build error: Based on the error output, I'll analyze and provide a solution: • Detected Error: "ln: /home/build/melange-out/ruby-3.1-base/usr/bin/.1: File exists" • Error Category: Configuration/Pipeline • Failure Point: Subpackage pipeline for ruby-3.1-base during symbolic link creation • Root Cause Analysis: The error occurs in the subpackage pipeline when trying to create symbolic links. The issue appears to be with duplicate link creation attempts or an existing file interfering with the linking process. • Suggested Fix: Modify the subpackage pipeline to handle existing files more gracefully: - name: "${{package.name}}-base"
description: "Ruby ${{vars.major-minor-version}} base"
pipeline:
- runs: |
mkdir -p ${{targets.contextdir}}
mv ${{targets.destdir}}/* ${{targets.contextdir}}
mkdir -p ${{targets.destdir}}/usr/bin
mkdir -p ${{targets.contextdir}}/usr/bin
for bin in ${{targets.contextdir}}/usr/libexec/ruby/${{vars.stdlib-version}}/*; do
bn="$(basename $bin)"
ln -sf /usr/libexec/ruby/${{vars.stdlib-version}}/$bn ${{targets.destdir}}/usr/bin/
ln -sf /usr/libexec/ruby/${{vars.stdlib-version}}/$bn ${{targets.contextdir}}/usr/bin/$bn${{vars.major-minor-version}}
done • Explanation:
• Additional Notes:
• References: |
Gen AI suggestions to solve the build error: Based on the build error, I'll analyze and provide a solution: • Detected Error: • Error Category: Configuration • Failure Point: Symbolic link creation during ruby-3.1-base subpackage pipeline • Root Cause Analysis: The error occurs in the subpackage pipeline when trying to create symbolic links. Multiple attempts to create the same symbolic link are occurring, likely due to the loop creating both regular and versioned links. • Suggested Fix: Modify the subpackage pipeline to avoid duplicate link creation: - name: "${{package.name}}-base"
description: "Ruby ${{vars.major-minor-version}} base"
pipeline:
- runs: |
mkdir -p ${{targets.contextdir}}
mv ${{targets.destdir}}/* ${{targets.contextdir}}
mkdir -p ${{targets.destdir}}/usr/bin
mkdir -p ${{targets.contextdir}}/usr/bin
for bin in ${{targets.contextdir}}/usr/libexec/ruby/${{vars.stdlib-version}}/*; do
if [ -f "$bin" ]; then
bn="$(basename $bin)"
ln -sf /usr/libexec/ruby/${{vars.stdlib-version}}/$bn ${{targets.destdir}}/usr/bin/$bn
ln -sf /usr/libexec/ruby/${{vars.stdlib-version}}/$bn ${{targets.contextdir}}/usr/bin/$bn${{vars.major-minor-version}}
fi
done • Explanation:
• Additional Notes:
• References:
|
Gen AI suggestions to solve the build error: Based on the error output, I'll analyze and provide a solution: • Detected Error: "ln: /home/build/melange-out/ruby-3.1-base/usr/bin/.1: File exists" • Error Category: Configuration • Failure Point: Symlink creation during ruby-3.1-base subpackage pipeline • Root Cause Analysis: The error occurs during the symlink creation step in the ruby-3.1-base subpackage pipeline. The issue appears to be an attempt to create duplicate symlinks or a collision in the symlink creation process. • Suggested Fix: - name: "${{package.name}}-base"
description: "Ruby ${{vars.major-minor-version}} base"
pipeline:
- runs: |
mkdir -p ${{targets.contextdir}}
mv ${{targets.destdir}}/* ${{targets.contextdir}}
mkdir -p ${{targets.destdir}}/usr/bin
mkdir -p ${{targets.contextdir}}/usr/bin
for bin in ${{targets.contextdir}}/usr/libexec/ruby/${{vars.stdlib-version}}/*; do
bn="$(basename $bin)"
ln -sf /usr/libexec/ruby/${{vars.stdlib-version}}/$bn ${{targets.destdir}}/usr/bin/
ln -sf /usr/libexec/ruby/${{vars.stdlib-version}}/$bn ${{targets.contextdir}}/usr/bin/$bn${{vars.major-minor-version}}
done • Explanation:
• Additional Notes:
• References:
|
Gen AI suggestions to solve the build error: Based on the error output, I'll analyze and provide a solution: • Detected Error: • Error Category: Configuration • Failure Point: Symbolic link creation in the ruby-3.1-base subpackage pipeline • Root Cause Analysis: The error occurs during the symlink creation step in the subpackage pipeline. The issue appears to be an attempt to create duplicate symlinks or a collision in the symlink creation process. • Suggested Fix: Modify the symlink creation logic in the ruby-3.1-base subpackage pipeline to handle existing files: - name: "${{package.name}}-base"
description: "Ruby ${{vars.major-minor-version}} base"
pipeline:
- runs: |
mkdir -p ${{targets.contextdir}}
mv ${{targets.destdir}}/* ${{targets.contextdir}}
mkdir -p ${{targets.destdir}}/usr/bin
mkdir -p ${{targets.contextdir}}/usr/bin
for bin in ${{targets.contextdir}}/usr/libexec/ruby/${{vars.stdlib-version}}/*; do
bn="$(basename $bin)"
ln -sf /usr/libexec/ruby/${{vars.stdlib-version}}/$bn ${{targets.destdir}}/usr/bin/
ln -sf /usr/libexec/ruby/${{vars.stdlib-version}}/$bn ${{targets.contextdir}}/usr/bin/$bn${{vars.major-minor-version}}
done • Explanation:
• Additional Notes:
• References:
|
Gen AI suggestions to solve the build error: • Detected Error: "ln: /home/build/melange-out/ruby-3.1-base/usr/bin/.1: File exists" • Error Category: Build Configuration • Failure Point: Symbolic link creation in ruby-3.1-base subpackage pipeline • Root Cause Analysis: The error occurs during the creation of symbolic links in the subpackage pipeline. The issue appears to be an attempt to create a duplicate symbolic link where one already exists. • Suggested Fix: Modify the subpackage pipeline to handle existing links: - name: "${{package.name}}-base"
pipeline:
- runs: |
mkdir -p ${{targets.contextdir}}
mv ${{targets.destdir}}/* ${{targets.contextdir}}
mkdir -p ${{targets.destdir}}/usr/bin
mkdir -p ${{targets.contextdir}}/usr/bin
for bin in ${{targets.contextdir}}/usr/libexec/ruby/${{vars.stdlib-version}}/*; do
bn="$(basename $bin)"
ln -sf /usr/libexec/ruby/${{vars.stdlib-version}}/$bn ${{targets.destdir}}/usr/bin/
ln -sf /usr/libexec/ruby/${{vars.stdlib-version}}/$bn ${{targets.contextdir}}/usr/bin/$bn${{vars.major-minor-version}}
done • Explanation: Adding the • Additional Notes:
• References:
|
Gen AI suggestions to solve the build error: • Detected Error: "ln: /home/build/melange-out/ruby-3.1-base/usr/bin/.1: File exists" • Error Category: Build Configuration • Failure Point: Symlink creation in ruby-3.1-base subpackage pipeline • Root Cause Analysis: The error occurs during the symbolic link creation step in the ruby-3.1-base subpackage pipeline. The script is attempting to create symbolic links that already exist, likely due to multiple binary targets being linked to the same destination. • Suggested Fix: Modify the symlink creation logic in the ruby-3.1-base subpackage pipeline to handle existing links: - name: "${{package.name}}-base"
description: "Ruby ${{vars.major-minor-version}} base"
pipeline:
- runs: |
mkdir -p ${{targets.contextdir}}
mv ${{targets.destdir}}/* ${{targets.contextdir}}
mkdir -p ${{targets.destdir}}/usr/bin
mkdir -p ${{targets.contextdir}}/usr/bin
for bin in ${{targets.contextdir}}/usr/libexec/ruby/${{vars.stdlib-version}}/*; do
bn="$(basename $bin)"
ln -sf /usr/libexec/ruby/${{vars.stdlib-version}}/$bn ${{targets.destdir}}/usr/bin/
ln -sf /usr/libexec/ruby/${{vars.stdlib-version}}/$bn ${{targets.contextdir}}/usr/bin/$bn${{vars.major-minor-version}}
done • Explanation:
• Additional Notes:
• References:
|
Gen AI suggestions to solve the build error: • Detected Error: "ln: /home/build/melange-out/ruby-3.1-base/usr/bin/.1: File exists" • Error Category: Build Configuration • Failure Point: Symlink creation in ruby-3.1-base subpackage pipeline • Root Cause Analysis: The error occurs during the creation of symlinks in the subpackage pipeline. The script is attempting to create symbolic links that already exist, likely due to multiple binary files trying to create links with the same name. • Suggested Fix: Modify the symlink creation logic in the subpackage pipeline to handle existing files: - name: "${{package.name}}-base"
pipeline:
- runs: |
mkdir -p ${{targets.contextdir}}
mv ${{targets.destdir}}/* ${{targets.contextdir}}
mkdir -p ${{targets.destdir}}/usr/bin
mkdir -p ${{targets.contextdir}}/usr/bin
for bin in ${{targets.contextdir}}/usr/libexec/ruby/${{vars.stdlib-version}}/*; do
bn="$(basename $bin)"
ln -sf /usr/libexec/ruby/${{vars.stdlib-version}}/$bn ${{targets.destdir}}/usr/bin/
ln -sf /usr/libexec/ruby/${{vars.stdlib-version}}/$bn ${{targets.contextdir}}/usr/bin/$bn${{vars.major-minor-version}}
done • Explanation:
• Additional Notes:
• References:
|
Gen AI suggestions to solve the build error: Based on the build error, I'll analyze and provide a solution: • Detected Error: • Error Category: Configuration • Failure Point: During the ruby-3.1-base subpackage pipeline when creating symbolic links • Root Cause Analysis: The symbolic link creation is failing because the target file already exists. This happens in the subpackage pipeline where it's trying to create links for the Ruby binaries. • Suggested Fix: - name: "${{package.name}}-base"
description: "Ruby ${{vars.major-minor-version}} base"
pipeline:
- runs: |
mkdir -p ${{targets.contextdir}}
mv ${{targets.destdir}}/* ${{targets.contextdir}}
mkdir -p ${{targets.destdir}}/usr/bin
mkdir -p ${{targets.contextdir}}/usr/bin
# Add removal of existing links
rm -f ${{targets.destdir}}/usr/bin/*
rm -f ${{targets.contextdir}}/usr/bin/*
for bin in ${{targets.contextdir}}/usr/libexec/ruby/${{vars.stdlib-version}}/*; do
bn="$(basename $bin)"
ln -sf /usr/libexec/ruby/${{vars.stdlib-version}}/$bn ${{targets.destdir}}/usr/bin/
ln -sf /usr/libexec/ruby/${{vars.stdlib-version}}/$bn ${{targets.contextdir}}/usr/bin/$bn${{vars.major-minor-version}}
done • Explanation:
• Additional Notes:
• References:
|
fcc8bf5
to
dd1c8f9
Compare
Note, making these changes now, before SCA changes are merged, will not impact existing packages. But after SCA changes land, it would be ideal that we rebuild the Ruby world |
dd1c8f9
to
b97e4cf
Compare
This makes Ruby 3.1-3.3 coinstallable, allowing for multiple versions of Ruby to be installed at the same time. This will help us simplifiy a lot of package manifests we have for Ruby as we'll be able to build gems for multiple Ruby versions within the same definition, without creating an entirely separate manifest To full leverage this, we'll need to make SCA changes: chainguard-dev/melange#1676 And then rebuild the world for Ruby (purging the cmd:ruby dependency that all packages have right now, causing the resolver to fail unless you explicitly request a version of Ruby that aligns with the gem) Signed-off-by: RJ Sampson <[email protected]>
b97e4cf
to
32eb352
Compare
This makes Ruby 3.1-3.3 coinstallable, allowing for multiple versions of Ruby to be installed at the same time. This will help us simplifiy a lot of package manifests we have for Ruby as we'll be able to build gems for multiple Ruby versions within the same definition, without creating an entirely separate manifest
To full leverage this, we'll need to make SCA changes: chainguard-dev/melange#1676
And then rebuild the world for Ruby (purging the cmd:ruby dependency that all packages have right now, causing the resolver to fail unless you explicitly request a version of Ruby that aligns with the gem)