Skip to content

Conversation

@octo-sts
Copy link
Contributor

@octo-sts octo-sts bot commented Sep 11, 2025

Signed-off-by: wolfi-bot <121097084+wolfi-bot@users.noreply.github.com>
@octo-sts octo-sts bot added request-version-update request for a newer version of a package automated pr gdcm labels Sep 11, 2025
@octo-sts octo-sts bot mentioned this pull request Sep 11, 2025
@octo-sts
Copy link
Contributor Author

octo-sts bot commented Sep 11, 2025

🩹 Build Failed: Patch Application Failed

Reversed (or previously applied) patch detected! Assume -R? [n] Apply anyway? [n] Skipping patch. Hunk #1 ignored at 16. 1 out of 1 hunk ignored -- saving rejects to file Source/MediaStorageAndFileFormat/gdcmImageChangePhotometricInterpretation.h.rej

Build Details

Category Details
Build System melange
Failure Point patch step applying numeric-limits.patch to gdcmImageChangePhotometricInterpretation.h

Root Cause Analysis 🔍

The patch appears to be already applied or reversed, causing the patch application to fail. The patch system detected that the changes in numeric-limits.patch are either already present in the source code or are being applied in reverse, resulting in a patch rejection and build failure.


🔍 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

Suggested Changes

File: gdcm.yaml

  • version_update at line 3 (package.version)
    Original:
version: "3.3.0"

Replacement:

version: "3.3.1"

Content:

Update package version to latest upstream release
  • commit_hash_update at line 18 (expected-commit)
    Original:
expected-commit: 3ec8a08b25b04b8fae9eb54ce1548c7847f54fc0

Replacement:

expected-commit: [commit_hash_for_v3.3.1]

Content:

Update expected commit hash to match v3.3.1 tag
  • patch_removal at line 20-23 (patch step)
    Original:
  # This patch Fixes "missing <limits> header"
  # Without the header, leads to compilation failures since upstream code uses std::numeric_limits functions.
  - uses: patch
    with:
      patches: numeric-limits.patch

Content:

Remove the entire patch step since the fix is likely included in upstream v3.3.1

File: numeric-limits.patch

  • file_deletion (entire file)
    Original:
[entire patch file]

Replacement:

[delete file]

Content:

Delete the patch file as it's no longer needed
Click to expand fix analysis

Analysis

All three similar fixes follow a consistent pattern: when patches fail due to being "already applied" or "reversed", the solution is to update the package to a newer upstream version and remove the problematic patch. In Fix #0, they updated from v0.3.5 to v0.3.6 and removed collectd-download-url-fix.patch. In Fix #1, they updated from v3.0.0 to v3.0.1 and removed gh636.patch. In Fix #2, they updated from v3.7.7 to v3.7.8 and removed CVE patches. This pattern indicates that newer upstream versions have incorporated the fixes that were previously applied as patches, making the separate patches redundant and causing conflicts.

Click to expand fix explanation

Explanation

The fix follows the exact pattern observed in all similar cases: the numeric-limits.patch is failing because the missing header fix has likely been incorporated into upstream GDCM v3.3.1 or later. When patches detect they are "already applied", it typically means the upstream codebase now includes those changes natively. By updating to the latest upstream version (v3.3.1 or newer) and removing the now-redundant patch, we eliminate the conflict. This approach maintains the Wolfi principle of using the latest upstream versions while removing obsolete patches that cause build failures. The patch was originally needed to fix missing std::numeric_limits functionality, but newer upstream versions would have addressed this C++ standards compliance issue.

Click to expand alternative approaches

Alternative Approaches

  • If v3.3.1 doesn't exist or doesn't contain the fix, check for v3.3.0.1 or other patch releases
  • Examine the actual patch content and verify if the changes exist in the current source code before removing
  • Apply the patch with --reverse flag to see if it was applied in reverse, then adjust accordingly
  • Check upstream commit history to confirm when the header fix was merged

Was this comment helpful? Please use 👍 or 👎 reactions on this comment.

@octo-sts octo-sts bot added the ai/skip-comment Stop AI from commenting on PR label Sep 11, 2025
@powersj
Copy link
Member

powersj commented Sep 12, 2025

3.3.0 upstream was removed so closing this.

@powersj powersj closed this Sep 12, 2025
@octo-sts octo-sts bot deleted the wolfictl-539e2fa4-00c2-4c1e-a524-113157b19823 branch September 13, 2025 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai/skip-comment Stop AI from commenting on PR automated pr gdcm request-version-update request for a newer version of a package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants