Open rconde01 opened 3 days ago
Thanks for the suggestion @rconde01, but this is not really a gap but intended:
download()
the sources instead of git-clone
the sources, so this doesn't seem a necessary use case so far.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.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?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.source()
method is something like this?
def source(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 work
git.folder = "target" # cd target
git.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.
Sounds good, lets move to the docs repo
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?