Skip to content
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

fix: multi-prefix replacement in binary files #570

Merged
merged 1 commit into from
Mar 19, 2024

Conversation

wolfv
Copy link
Contributor

@wolfv wolfv commented Mar 19, 2024

The pkg-config package encodes (in the binary) a "PATH" variable that looks something like:

/prefix_placeholder/lib:/prefix_placeholder/etc/share\0

So far we only replaced the initial prefix placeholder, and skipped past the rest.

With this change we first get the whole "c-string" (until the \0), and then replace each occurence of the prefix in the c-string. The padding is then added to make sure that the strings are of the same length.

@baszalmstra baszalmstra enabled auto-merge (squash) March 19, 2024 10:33
@baszalmstra baszalmstra merged commit 602aa4d into conda:main Mar 19, 2024
14 checks passed
@wolfv wolfv deleted the fix-prefix-replacement branch March 19, 2024 10:43
baszalmstra added a commit that referenced this pull request Mar 19, 2024
## 🤖 New release
* `rattler`: 0.19.3 -> 0.19.4 (✓ API compatible changes)

<details><summary><i><b>Changelog</b></i></summary><p>

## `rattler`
<blockquote>

##
[0.19.4](rattler-v0.19.3...rattler-v0.19.4)
- 2024-03-19

### Fixed
- multi-prefix replacement in binary files
([#570](#570))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/MarcoIeni/release-plz/).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants