conan icon indicating copy to clipboard operation
conan copied to clipboard

How to identify the target architecture of a package without traversing conaninfo.txt

Open sshristi21 opened this issue 6 months ago • 10 comments

What is your question?

Hello,

We push our conan packages to Jfrog and we build multiplt platforms for each module. So each module usually has 8-10 packages, and we have to expand each of them and read conaninfo.txt to identify the platform on which the package is built. Is there a more convenient way of doing this? Can we tag the packages somehow via which we can identify from top level without expanding the package.

Have you read the CONTRIBUTING guide?

  • [ ] I've read the CONTRIBUTING guide

sshristi21 avatar Sep 08 '25 12:09 sshristi21

Hi @sshristi21

Thanks for your question.

Sure, the conan list mypkg/version:* will conveniently list the package binaries (by default for the latest recipe-revision) with the relevant information for each one of the binaries. This information can be dumped to json with conan list ... --format=json > pkglist.json in the form of a "package list" that can be used for many other Conan operations like upload, remove, etc, see https://docs.conan.io/2/examples/commands/pkglists.html#examples-commands-pkglists

Moreover, the conan list command has multiple arguments such as --filter-profile or --filter-settings that allows to list a subset of the binaries, those that matches the condition of the argument.

Please let me know if this helps.

memsharded avatar Sep 08 '25 12:09 memsharded

Is there also a way to tag the package with particular name so that we can view it on Jfrog as well without using cli?

sshristi21 avatar Sep 15 '25 07:09 sshristi21

Yes, all the settings and options belonging to conaninfo.txt are added as Artifactory artifact properties for those packages. These are visible on the web UI when you click on the specific package folder. You can use those via de JFrog HTTP API I think.

It might not be as straight forward as using the Conan client, because you'll need to take into account the Artifactory paths and package layout and structure.

Is there also a way to tag the package with particular name so that we can view it on Jfrog as well without using cli?

Yes, if you want to add or read your own Artifactory artifact properties, you can. We have the conan art:xxx extension command in the conan-extensions repo in https://github.com/conan-io/conan-extensions, that helps to add and read properties for Conan recipes and package binaries, but you can do it also with the JFrog HTTP API.

Note that it is possible that you might be wanting to do some operation on JFrog, like a package promotion, or a Release Bundle for a certain architecture or something like that. Check the other conan art:xxx extension commands, because there are utilities to create BuildInfo and ReleaseBundle, to do promotions.

Please let me know if this helps.

memsharded avatar Sep 15 '25 12:09 memsharded

Hi @sshristi21

Did you check the above? Did you manage to check those properties? Thanks for the feedback.

memsharded avatar Sep 25 '25 08:09 memsharded

Hi @memsharded

I will check this in couple of days and will get back to you.

sshristi21 avatar Sep 29 '25 14:09 sshristi21

Hi @memsharded

I checked the conan list command however, I am using conan 1.63 version so it doesn't work for me. I was able to list the packages using conan search command, however, I don't think it has as many options as conan list command.

sshristi21 avatar Sep 30 '25 06:09 sshristi21

No, the conan search in Conan 1 is not as good as the conan list in conan 2.

Still, it should be able to list the binaries, if you provide a full reference like:

$ conan search hello/0.1@demo/testing

Existing packages for recipe hello/0.1@demo/testing:

Package_ID: 3fb49604f9c2f729b85ba3115852006824e72cab
    [options]
        shared: False
    [settings]
        arch: x86_64
        build_type: Release

In any case, isn't the question:

Is there also a way to tag the package with particular name so that we can view it on Jfrog as well without using cli?

So it seems that you didn't want to use the Conan cli, but the JFrog http api?

memsharded avatar Sep 30 '25 08:09 memsharded

Yes @memsharded , while navigating through Jfrog UI it is very inconvenient to figure out the exact package as all of them appear in form of hashes. We wanted to identify it based on some tag or create custom tags instead of hashes which are created by default via conan.

sshristi21 avatar Oct 08 '25 11:10 sshristi21

Yes @memsharded , while navigating through Jfrog UI it is very inconvenient to figure out the exact package as all of them appear in form of hashes.

The thing is that you shouldn't need to navigate the JFrog UI that way, via hashes. What problem are you trying to solve? Conan packages can be managed and identified with Conan "package lists", but also in the server side with Artifactory BuildInfo or ReleaseBundles. It shouldn't be necessary to search on the server for that information, as that information is already known when you are building things.

For example, when you are installing one of your configurations, like Windows+msvc+shared+Release+armv8, all of that information will be captured in the graph.json that can easily be converted to a "package list" that can be further used to upload/download/remove and even do promotions with conan art:promote extension command between server repos.

memsharded avatar Oct 08 '25 11:10 memsharded

Any further question or comment here? If not, I think we can close the ticket as answered, please let us know.

memsharded avatar Nov 11 '25 17:11 memsharded

Closing as answered, please open new tickets for any further question, thanks for the feedback.

memsharded avatar Dec 15 '25 09:12 memsharded