• 
      

    Fix patch failures with moved binary files with GNU patch 2.7+

    Review Request #15011 — Created April 10, 2026 and updated

    Information

    RBTools
    release-6.x

    Reviewers

    GNU patch has gained the ability to do binary file renames based on git
    headers, which was breaking the patcher (since we assumed we had to do
    it ourselves). This change adds a check to see if the rename happened
    already, and avoid crashing if so.

    This also adds a test which simulates this situation even for systems
    with older patch versions.

    • Ran unit tests.
    • Tested that a moved binary file worked correctly with the newer patch
      version.
    Summary ID
    Fix patch failures with moved binary files with GNU patch 2.7+
    GNU `patch` has gained the ability to do binary file renames based on git headers, which was breaking the patcher (since we assumed we had to do it ourselves). This change adds a check to see if the rename happened already, and avoid crashing if so. This also adds a test which simulates this situation even for systems with older `patch` versions. Testing Done: - Ran unit tests. - Tested that a moved binary file worked correctly with the newer `patch` version.
    wmlxmoxonuztwrmrurvtztnszxqzqxox
    Checks run (2 succeeded)
    flake8 passed.
    JSHint passed.