Set default storage folder to $CONAN_USER_HOME/.conan/data - #7910
Conversation
|
Hi @Sfairat Thanks for contributing this. I think it would be necessary to have a red/green test for this fix, so we make sure that this is both fixed correctly and we don't break it in the future. Please have a look to the test suite, if the bug is fired by |
|
@memsharded Thanks for the feedback - I was convinced that tests are necessary here. Will add later this week. |
Excellent. Conan 1.31 is planned for next week, if we could have the tests this week, this could be included. Adding it to the milestone. Thanks again! |
|
Hi @Sfairat We are doing 1.31 this week, could you please add a test for this fix? If not possible, we might try to contribute the test, please tell. Thanks! |
Changelog: Bugfix: Set default storage_folder to .conan/data in case if storage_path entry fails to be defined by conan.conf.
Docs: Omit
Set default storage_folder to .conan/data in case if storage/path entry is missing from the conan.conf. Usage of .conan for storage root seems to be a mistake and leads to failures in case of various operations, like conan config install <some_relatively_deep_git_repo>
We've noticed that sometimes when doing conan install from a git repo, we're getting an error like:
It turned out that, if [storage] / path entry in conan.conf is missing, the default storage path would be set to $CONAN_USER_HOME/.conan ; which looks to be incorrect. Default per here seems to be $CONAN_USER_HOME/.conan/data .
Later during conan config install command execution, conan tries to traverse all packages to fix the remotes, but given that it clones the config repo to the temporary directory within .conan dir, it tries to read packages in the temporarily cloned repo and fails with the error above.
Adding "data" at the end of the path fixes the error.
developbranch, documenting this one.Note: By default this PR will skip the slower tests and will use a limited set of python versions. Check here how to increase the testing level by writing some tags in the current PR body text.