-
Notifications
You must be signed in to change notification settings - Fork 949
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
[bug][2.0] patches cannot be applied when using cmake_layout #10374
Comments
This might be missing a small detail: with files.chdir(self, self.source_folder):
for patch in self.conan_data["patches"][str(self._upstream_version)]:
files.patch(self, **patch) Note:
|
I thought I was supposed to apply patches in Isn't the whole source folder copied to the build folder? I do see the patches in it. |
You are applying patches in the source copy contained in the build directory, not on the original sources. But the layout inside the cache is still the same, and there will be a "source" subfolder and a "build" subfolder, to replicate and mimic the user layour (while in dev in their user folder), inside the "build" folder of the cache for the current package_id. What you should not do is the |
I see, I just got confused big time 🤯 Thanks for the info! |
I still have to explicitly write the full path to the patch file though, or change the cwd myself, as there is no way to set the cwd for |
Not sure what you mean, the code above I tested it, seems to be working fine: def build(self):
with files.chdir(self, self.source_folder):
for patch in self.conan_data["patches"][str(self._upstream_version)]:
files.patch(self, **patch) |
Yeah it works on my side fine I just mean that it seems a bit weird to change directory inside the conan recipe itself, rather than with a kwarg |
Oh, that is a good point. Actually, it might be possible to try to use the |
Hi, I reopen this issue because I think that the default folder to contain the patch files shouldn't default to |
Related: #10643 |
Hello,
It seems that
files.patch
andcmake_layout
do not get along very well. The former does not find the patch files, even when specifyingbase_path=self.build_folder
, although they are inside the build folder.I've joined a 2.0 version of
docopt.cpp
that shows the issue.Environment Details (include every applicable attribute)
Steps to reproduce (Include if Applicable)
layout
methodtest_package
step(which breaks becausecmake_layout
is commented)Logs (Executed commands with output) (Include/Attach if Applicable)
docopt.cpp.zip
EDIT:
The test_package fails because I forgot to add
cmake_layout
there.The text was updated successfully, but these errors were encountered: