-
Notifications
You must be signed in to change notification settings - Fork 989
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
[feature] require the same thing twice with different options #13521
Comments
Hi @smoofra Thanks for your suggestion. I'd like to understand better what is the use that |
In this case, wine isn't repackaging anything -- although I have encountered other cases where repackaging is necessary. It is possible that repackaging could be used by a helper package to solve this problem. What |
The different architectures could maybe be different binaries, with different package_ids, that would be the recommended approach in general. So, if I understood correctly |
In an ideal world, maybe. But have you seen wine's build system? It's a world unto itself and this is the way they do things. And even if i did split wine into 32 and 64 bit package ids, I'd probably just end up with some consumer further up the graph that wants to run both 32 and 64 bit windows programs as tools, so the same issue would re-occur there, with some other package wanting And even if that didn't happen wine still needs at least two gcc packages.
Wine doesn't look for |
Perhaps this is a packaging question? Would it make sense to have 1 package with both 64 and 32 bit versions? Are they always both expected to be together? |
Thanks for the feedback, now I think I understood it better. I think it captures the use case that you are describing here, please have a look:
I am also investigating the use case of requiring same version with different options. This could be way more challenging, but lets see... |
ah, yea I can confirm that it behaves exactly like I need if looks good: (Pdb) p [v.cpp_info.bindirs for k,v in self.dependencies.build.items() if 'gcc' == k.ref.name]
[['/Volumes/build/conan2/gcc0b2c18cb1ea08/p/bin'], ['/Volumes/build/conan2/gcc92c136d09892a/p/bin']] If the versions are the same, i get the error |
I'm pretty confused as to why run=False does it. I thought this only controlled whether things were put into the virtualrunenv. What's the actual rule that controls whether you get one or two gcc nodes in the graph? |
Added some minor change necessary to make the
Not really, the |
@memsharded I tried your branch, it works! |
Implemented in #13529, will be released next 2.0.5. Thanks for the feedback! |
What is your suggestion?
I would like to require the same package twice, or more with different options.
I have a package called
gcc/9.1.0
, which takes the optionsos_target
andarch_target
.I have a recipe called
wine
and what I really want to do with that one isI tried wrapper recipes that require gcc, with every option of
direct
,visible
,run
, andbuild
that i can think of, but nothing does what i want.Whats blocking this from working is two things. First is the requires have the same package name and that's not allowed.
possible solution...
then the windows compiler could appear in
self.dependencies["gcc-win32"]
The second issue is that even if I create wrapper packages to require gcc, I can't get them to do what i wnat.
If the wrapper requires gcc with
visible=Fasle
, then the graph looks right, but thegcc
packages havebinary=Skip
set, so they can't be usedIf
visible=True
, then the graph only gets one node for gcc, which isn't what we want.Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: