You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the suggestion @rconde01, but this is not really a gap but intended:
Sources backup are intended for third-parties on the internet. So far the whole ConanCenter recipes can download() the sources instead of git-clone the sources, so this doesn't seem a necessary use case so far.
Backuping a tgz or zip file based on its declared checksum can be done relatively robustly. What is the process of backuping a cloned & checkout repository? this is not clear at all, if the full repo with .git folder should be backuped or not.
What is the process of reusing a backup from a git checkout? It means that the backup cannot be done after a git clone, because that might not be the correct code if a checkout is following. What if a recipe does a checkout of 2 different branches, one to build the code and other to build the docs?
Backuping only the current files of the checkout will be insufficient for users that expect some git operations to work later. Backuping the .git folder can have issues, as file permissions or other stuff might not be fully portable in all platforms.
What is the process of recovering a backup if the source() method is something like this?
defsource(self):
git=Git(self) # by default, the current folder "."git.clone(url="<repourl>", target="target") # git clone url target# we need to cd directory for next command "checkout" to workgit.folder="target"# cd targetgit.checkout(commit="<commit>") # git checkout commit
That is basically intractable. Conan would need to understand the whole execution flow and steps of the source() method, to be able to provide a reproducible state that comes from a .tgz backup in Conan that replicates the result of the git operations.
I am afraid this is not planned, backup sources will only support downloading files, not git operations.
Thanks for the feedback!
That seems reasonable - but I would suggest updating the docs for backup sources saying this situation is not (and will not be) handled, and some options for transforming the recipe such that it can be supported.
What is your suggestion?
The source backup feature works with
get
anddownload
, but not withGit
. This seems like a big gap.Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: