-
Notifications
You must be signed in to change notification settings - Fork 985
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”, 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
[question] How to consume (download + deploy) a given package list? #17265
Comments
Hi @guban Thanks for your question.
It is possible to do a Deployments need a dependency graph. The recommended approach for what you want is to do:
Then, with the
This is because installation and deployment is needed for also calling the It is true that Please let me know if this helps |
Hi @memsharded, It looks like "conan install" with a lockfile and a deployer covers my scenario. I have a further question about the lockfile generated on the build machine. Thanks! |
this is a very good question. Conan at the moment is not opinionated on that. The most common storage of lockfiles for "final consumer" applications would be the git repo, as source. In that way, with For intermediate lockfiles in a graph, it is a more complex situation. So your intuition about the metadata is good, it might be a good place to store lockfiles. At least for Conan, I am not sure yet if it would be easy for users if Conan doesn't automate it, because it requires some extra Note that lockfiles in Conan 2 can be used to store multiple configurations, if they are intended to be consistent accross different configurations. So probably it is not necessary to have a Even more, it is possible to use lockfiles from a downstream consumer in the graph dependencies. Lets say that you have a consumer project "app" in a Git repo, and that repo contains the lockfile for the "app". That lockfile can be used to build and lock any other package in the dependency graph of "app". |
I reviewed #10261 and documentation on lockfiles to better understand the matter. My use of lockfiles is quite limited. conan install --requires=my/1.0@companyA -pr:a=profileA -l profileA.lock -d my_deployer then all dependencies are resolved to those binary packages (up to package id) that were built on the build machine. After the lockfile ( :: Consumer must provide the recipe and the *name* of a Conan profile file.
@set recipe=my/1.0@companyA
@set profile=profileA
:: Download recipe metadata from the Conan remote.
conan download %recipe% -r origin -m="*"
:: Get the recipe metadata folder in the local Conan cache.
conan cache path %recipe% --folder=metadata > m_dir
@set /p m_dir=<m_dir
:: Get all the binaries.
conan install --requires=%recipe% -pr:a=%m_dir%\%profile% -l %m_dir%\%profile%.lock -d full_deploy I think this particular behavior is too specific for justifying its wrapping into a standard Conan command. When all conanfiles are combined into a single one, how can updates to that file be synchronized? What if information stored in Anyhow, I've got a working solution to my problem. |
I think this PR that we are preparing to the docs can be interesting: conan-io/docs#3799 It is a full new
We had this more or less similar in Conan 1.X, the other way round, it was the lockfile file that contained a copy of the profiles. |
What is your question?
Hello,
Could you please help me to figure out the second part of my scenario:
a. build a package (say,
my/1.0@companyA
) and its dependencies, andb. upload all needed binary packages (including dependencies) to a conan server.
Download binaries of that package, as well as its dependencies
first into the local cache and then deploy them into a custom working directory
I implemented part (1) as follows:
Here, we build the package in local cache, create a package list and upload all packages in that list to the server.
The question is: how to do part (2)?
That is, how can I
pkglist.json
into the local cache on the consumer machine, andThat working directory is intended for wrapping those binaries in an installer MSI package.
On the consumer machine, I can use either of the files
graph.json
,pkglist.json
and maybe evenout.lock
.I studied lockfiles, package lists, deployers, but could not figure out the proper/recommended way of doing part (2).
Could you please help?
Thank you!
Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: