conan-io / hooks

Official Conan client hooks
MIT License
32 stars 46 forks source link

[conan-center] Check exported patches are the same ones listed in conandata #435

Open danimtb opened 2 years ago

danimtb commented 2 years ago

Now, I'm seeing this pattern in many recipes:

    def export_sources(self):
        self.copy("CMakeLists.txt")
        for patch in self.conan_data.get("patches", {}).get(self.version, []):
            self.copy(patch["patch_file"])

The recipe is taking care of exporting only the patches it is going to use. Maybe this hook is no longer needed.

That's great then! Probably we have to document this as good practice, so it is easy to check by reviewers or maybe have a hook check that makes sure that the files listed in the reduced conandata are exactly the same ones exported.

Originally posted by @danimtb in https://github.com/conan-io/hooks/issues/218#issuecomment-1182905150

prince-chrismc commented 2 years ago

CCI docs: https://github.com/conan-io/conan-center-index/pull/11982