-
Notifications
You must be signed in to change notification settings - Fork 1k
[bug] package has 'exports_sources' but sources not found in local cache from local conan center index #18371
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&rdqu 8000 o;, 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
Comments
Hi @igadmg thanks a lot for taking the time to report this, we appreciate it After trying a few different ways, I have not yet been able to reproduce this.
This succeeds regardless of how my test is set-up, so I'd appreciate it you could provide a minimal reproducible example to be able to track it down - see https://github.com/conan-io/conan/pull/18382/files for the test I mentioned |
I have also tried myself to reproduce without success. def test_export_sources():
folder = temp_folder()
recipes_folder = os.path.join(folder, "recipes")
mypkg_config = textwrap.dedent("""
versions:
"1.0":
folder: all
""")
mypkg = textwrap.dedent("""
from conan import ConanFile
from conan.tools.files import load
class Zlib(ConanFile):
name = "mypkg"
exports_sources = "*"
def build(self):
self.output.info(f"CONANDATA: {self.conan_data}")
self.output.info(f"BUILDING: {load(self, 'file.h')}")
""")
save_files(recipes_folder,
{"mypkg/config.yml": mypkg_config,
"mypkg/all/conanfile.py": mypkg,
"mypkg/all/conandata.yml": "",
"mypkg/all/file.h": "//myheader"})
c = TestClient(light=True, default_server_user=True)
c.run(f"remote add local '{folder}' --index=0")
c.save({"conanfile.txt": "[requires]\nmypkg/1.0"})
c.run("install . --build missing")
assert "mypkg/1.0: CONANDATA: {}" in c.out
assert "mypkg/1.0: BUILDING: //myheader" in c.out I have also tried to follow the steps manually, but it didn't fail either. |
Strange, I was trying to extract our project setup to show the problem but that time it builds. I will try to make a test project later. |
But that still happen in the full project, and that is very annoying. |
Describe the bug
We had our local conan center index with some packages which does not exist in central conan center. That index is setup with
conan remote add --index 0 --force local-conan-center ./conan/conan-center-index
So here what is broken. If I clear local cache with
conan remove "*" -c
and then build withconan install ./src --output-folder . --build missing --settings build_type=Debug
I got all packages from official conan center built correctly, even the one which are duplicated in our local conan center, but when conan try to build packages which exist only in our local conan center I got that errorpackage has 'exports_sources' but sources not found in local cache from local conan center index
and package is not built until I by hand remove it withconan remove "vtk/*"
(for example)Why that is happening, I it possible to fix that, very annoying and prevents new deployments.
How to reproduce it
conan remote add --index 0 --force local-conan-center ./conan/conan-center-index
conan remove "*" -c
The text was updated successfully, but these errors were encountered: