Conan 1.5.0 on Centos 7 with manual call to build script
Hi,
I have several packages which are stored remotely along with their sources and every time I build my local packages those packages being downloaded and the sources are compiled. Since the 1.5.0 release this is no longer working. The build fails with the following message
ERROR: MyApp/0.3.1@deployment/stable: Error in build() method, line 15
self.build_qmake()
FileNotFoundError: [Errno 2] No such file or directory: '/home/KrFe/.conan/data/MyApp/0.3.1/deployment/stable/build/5f1f71e5f81572eb63e3ce82c8c876a9e189d77b/modules/MyApp/projects/MyApp/conanbuildinfo.pri'
From the debug logging I learned the download of the sources was successful as was unzipping them. But still, the relevant directories
/home/KrFe/.conan/data/MyApp/0.3.1/deployment/stable/source
and
/home/KrFe/.conan/data/MyApp/0.3.1/deployment/stable/export_source
are empty.
To be precise the problem I am facing was introduced with commit 0388f5a3a256b14b54e975e7e0651ed10528b38f and especially the changes to the _merge_directories_ method in _source.py_. In my case the structure within the downloaded source tgz looks like
export_source/include
export_source/modules
export_source/resources
Meaning only folder and no plain files on the top level. Thus the following line
dirs[:] = [d for d in dirs if not is_excluded(src_dir, d)]
in above mentioned method prevents copying the subdirectories. Commenting out this line seems to work for me.
From the release notes I could not find any hint what I would have to change in order to make it work with 1.5.0 version of conan. If I am doing something wrong or if you need additional information please let me know.
It looks like a bug. We will try to release a minor version asap. Thanks for reporting.
Hi, I'm not able to reproduce the issue. Could you specify if you are using:
exports_sources in the recipeexports in the recipesource() method in the recipeCould you provide also the whole output? I would need also the conan commands you are running.
Hi, I am using exports_sources in the recipe. From my understanding pulling the sources from remote is key.
The above error output is all I can see. But I instrumenting the code showed a first call to the merge method during installation of the package. In this step al data is moved from
MyApp/0.3.1/deployment/stable/export_source/.c_src
to
MyApp/0.3.1/deployment/stable/export_source/.
And then in a second call during the configuration step the sources are moved from
MyApp/0.3.1/deployment/stable/export_source/
to
MyApp/0.3.1/deployment/stable/source
If it helps my call to conan is
conan install MyApp/0.3.1@deployment/stable --build without having anything from this package in my conan cache.
Do you know which Conan version did you use to create these packages? the .c_src folder is something pre-1.0, like a year ago deprecated. Thanks for the info, let's check if I can reproduce now the issue and we can find a fix for the old packages layout.
I do not know the exact version but it was for sure pre 1.0.0. The package has been generated last September with a rather new version at that time. Unfortunately I could not find any metadata in the package telling the exact version.
Issue reproduced and fixed at https://github.com/conan-io/conan/pull/3169
It will be released probably later today.
Thank you very much for the very swift solution. I am happily awaiting the new version.
Hi again, we couldn't release today. It will need to wait for Friday morning, sorry for the delay. 馃槥
Finally, we made it. 1.5.2 is released. Let me know if you have any issue
Thanks again. I just ran my test case and all is working fine with the new release.