Conan: [suggestion] conan download prints download directory

Created on 16 Sep 2019  路  6Comments  路  Source: conan-io/conan

To help us debug your issue please explain:

  • [x] I've read the CONTRIBUTING guide.
  • [x] I've specified the Conan version, operating system version and any tool that can be relevant.
  • [x] I've explained the steps to reproduce the error or the motivation/use case of the question/suggestion.

Conan version 1.18.4

Distributor ID: Ubuntu
Description:    Ubuntu 16.04.6 LTS
Release:    16.04
Codename:   xenial

When running conan download to grab a very specific packageID for testing, it would be very beneficial to print the package location it was downloaded to.

We frequently will want to download a package and run some manual tests on it. It would be nice to print the package location so we can easily change to that directory and do testing.

$ conan download PackageA/2.30.7-0+dirty@PR_Tests/PackageB_PR-57:cbd42beaf630ba04d546eeb82d628cbf7aefb438 -r immaremote
Downloading conanmanifest.txt: 100%|##########| 105/105 [00:00<00:00, 55.1kB/s]
Downloading conanfile.py: 100%|##########| 1.21k/1.21k [00:00<00:00, 667kB/s]
Downloading conan_export.tgz: 100%|##########| 518/518 [00:00<00:00, 498kB/s]
Decompressing conan_export.tgz: 2.02kB [00:00, 249kB/s]                  
PackageA/2.30.7-0+dirty@PR_Tests/PackageB_PR-57: Retrieving package cbd42beaf630ba04d546eeb82d628cbf7aefb438 from remote 'immaremote' 
Downloading conanmanifest.txt: 100%|##########| 1.39k/1.39k [00:00<00:00, 1.81MB/s]
Downloading conaninfo.txt: 100%|##########| 6.71k/6.71k [00:00<00:00, 8.63MB/s]
Downloading conan_package.tgz: 100%|##########| 43.4M/43.4M [00:37<00:00, 1.22MB/s]
Decompressing conan_package.tgz: 43.4MB [00:01, 34.9MB/s]                            
PackageA/2.30.7-0+dirty@PR_Tests/PackageB_PR-57: Package installed cbd42beaf630ba04d546eeb82d628cbf7aefb438

cd ~/.conan/data/PackageA/2.30.7-0+dirty/PR_Tests/PackageB_PR-57/package/cbd42beaf630ba04d546eeb82d628cbf7aefb438/

triaging look into

All 6 comments

Ideally it would also be available in JSON output as well.

Hi @Mark-Hatch-Bose !

Does Conan info is enough or are you more interested in the package id?

conan info --paths PackageA/2.30.7-0+dirty@PR_Tests/PackageB_PR-57

NOTE: There is no example using --paths in docs. I gonna provide one.

Although I think this is useful, I think when you are downloading a specific package, you'd want to just know the package_folder location exactly. Just a UX improvement I guess.

conan info --paths does a full checking of downstream dependencies versions (we use version ranges) and may not end up with the same package_id as the one I downloaded.

I see your point. Some time ago I made this PR to print package folders for install command. Your case is specific for download command and only the the main package not its dependencies.

Maybe @memsharded has a different opinion about this one, since we didn't add verbose output for install because it was too noisy.

I think this issue makes sense and it could be categorized under the UX and command improvements. I made to tries and it is not possible to get the path a specific downloaded package as conan info --paths always takes a profile and cannot point to a package ID.

However, I would like to know more about your workflow @Mark-Hatch-Bose. Why are you downloading a specific package ID? What if the ID does not match the configuration of your machine? Wouldn't it be better to use some kind of deploy functionality like conan install <ref> -g deploy to install packages in a user-space folder?

I understand the need to debug a package, but isn't it more helpful to track the profile configurations that is causing issues instead of the package ID directly?

Thanks 馃槃

@danimtb We work on an embedded platform, the package/packageID I'm downloading contains a binary that I want to test on the target platform. We are using version ranges for all downstream requirements. I want the last "package" that was built by Jenkins. If I do conan install I am not guaranteed to have matching dependencies, as my local cache may contain valid downstream requirements that are different than what Jenkins prebuilt (we are using full_package_mode). If I do -u to install - it may grab later dependencies than last package built (if downstreams changed), which is not what I want either (causing me to have to rebuild locally, potentially a lot of things).

In this case, I'm grabbing the last run from a Jenkins build job and downloading the prebuilt package/packageID so I can sideload the binary onto the embedded platform and test it. From my understanding there is no way for me to install/download the latest already prebuilt package currently in Conan. (Maybe with revisions enabled this is possible? We do not have revisions enabled.)

Here is an older issue related to trying to find latest package already built that is closed:
https://github.com/conan-io/conan/issues/4745

Was this page helpful?
0 / 5 - 0 ratings