-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
autoconf: Do not clear "os" from package info #25786
base: master
Are you sure you want to change the base?
Conversation
Avoids compatibility issues between Windows and Linux.
Conan v1 pipeline ✔️Warning Conan Center will stop receiving updates for Conan 1.x packages soon - please see announcement. All green in build 1 (
Conan v2 pipeline ✔️
All green in build 1 ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
@@ -38,7 +38,9 @@ def requirements(self): | |||
self.requires("m4/1.4.19") # Needed at runtime by downstream clients as well | |||
|
|||
def package_id(self): | |||
self.info.clear() | |||
del self.info.settings.arch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The self.info.clear()
also clears:
- Possible variability from
options
, not an issue in this case - Possible variability from
dependencies
. In this case, it could be a problem asself.requires("m4/1.4.19")
is a requirement, and changing that version will create anotherpackage_id
. Most like theself.info.requires.clear()
is necessary too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand and I added this change to the branch.
I would imagine that a new version of m4 can change the output, but then the package revision would change as well.
A change in the version of m4 would also mean a change in the recipe revision though, so a new package would be generated anyway, does this actually avoid duplication?
To avoid generating a new package ID for each new version of the requirements.
Avoids compatibility issues between Windows and Linux.
Summary
Changes to recipe: autoconf
Motivation
Not including
os
information in the package means that packages built on Linux and Windows mix up, with same package ID and different package revisions. The most recent one will then be pulled from the remote and used, but they might actually not be fully compatible between OSes. In our case the Windows-built version did not have the executable flag set on the scripts inbin/
, this caused issues when using the package in a Linux environment.The symptoms were similar to conan-io/conan#14345, so we initially thought the problem happened in decompressing the package files.
Details
Just keep the
os
information, it causes minimal duplication and it makes sure the package works in all environments.