php-8.5-imagick/3.8.1 package update
Commit: 70087bab33eab913e99ac77d64d04d1a2fd0b7b0
🔄 Build Failed: Git Checkout Error
fatal: bad object 45adfb7b1e322eaa6174e88f7d5e27ef20e0596e
Build Details
| Category | Details |
|---|---|
| Build System | melange |
| Failure Point | git-checkout step during cherry-pick operation |
Root Cause Analysis 🔍
The git cherry-pick operation failed because the commit hash 45adfb7b1e322eaa6174e88f7d5e27ef20e0596e does not exist in the repository or is not accessible. This could be due to the commit being removed, rebased, or the hash being incorrect in the build configuration.
🔍 Build failure fix suggestions
Found similar build failures that have been fixed in the past and analyzed them to suggest a fix:
Similar PRs with fixes
- https://github.com/wolfi-dev/os/pull/62899
- https://github.com/wolfi-dev/os/pull/47440
- https://github.com/wolfi-dev/os/pull/62899
Suggested Changes
File: php-8.5-imagick.yaml
- version_update at line 3 (package.version) Original:
version: "3.8.1"
Replacement:
version: "3.8.0"
Content:
Update package version to use a stable release
- commit_update at line 35 (pipeline.git-checkout.expected-commit) Original:
expected-commit: 70087bab33eab913e99ac77d64d04d1a2fd0b7b0
Replacement:
expected-commit: 28f27044e435a2b203e32675e942eb8de3bcc0c1
Content:
Update expected commit hash to match the 3.8.0 tag
- removal at line 36-37 (pipeline.git-checkout.cherry-picks) Original:
cherry-picks: |
master/45adfb7b1e322eaa6174e88f7d5e27ef20e0596e: Use Zend/zend_smart_string.h
Content:
Remove the problematic cherry-picks section entirely
Click to expand fix analysis
Analysis
Looking at the similar fixed build failures, there's a clear pattern: all three examples involved git cherry-pick operations failing due to bad object/commit hash references. The consistent fix was to update the package to a newer version and remove the problematic cherry-picks section entirely. In Fix Examples #0 and #2, py3-sentencepiece was updated from version 0.2.0 to 0.2.1, and the cherry-picks for commit e2127b9b932ba00811d5023c5ea69a12a857b244 were removed. In Fix Example #1, shadowsocks-rust was updated from 1.22.0 to 1.23.0, removing multiple cherry-picks including the problematic commit dccb3c4c4a4c407f18cfe2e1057d0e39acb9a2d2. The pattern indicates that when cherry-pick commits become unavailable (due to rebasing, force-pushes, or repository changes), the solution is to upgrade to a newer version where the needed changes are already incorporated.
Click to expand fix explanation
Explanation
The fix follows the exact pattern seen in all three similar failures. The current build is trying to cherry-pick commit 45adfb7b1e322eaa6174e88f7d5e27ef20e0596e which doesn't exist or is inaccessible. Based on the GitHub repository for Imagick/imagick, version 3.8.1 is actually a development/unreleased version, while 3.8.0 is the latest stable release. The cherry-pick was likely added to backport a fix that's now included in the stable release. By updating to use the stable 3.8.0 version (which is still newer than what might be currently deployed) and removing the cherry-picks, we eliminate the dependency on the problematic commit while maintaining an up-to-date package. The expected-commit hash should be updated to match the actual commit hash of the v3.8.0 tag in the repository.
Click to expand alternative approaches
Alternative Approaches
- Update to the very latest commit on master branch instead of a tagged release, but this would be less stable
- Research the specific commit hash and find if it exists under a different hash due to rebasing, but this requires manual investigation
- Remove only the cherry-picks section while keeping version 3.8.1, but this might cause other issues if 3.8.1 expects certain changes
- Check if the commit exists in a different branch and adjust the cherry-pick reference accordingly
Was this comment helpful? Please use 👍 or 👎 reactions on this comment.