Skip to content
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

[bug] package query does not work for me #15780

Closed
freihamer opened this issue Feb 29, 2024 · 4 comments · Fixed by #15781
Closed

[bug] package query does not work for me #15780

freihamer opened this issue Feb 29, 2024 · 4 comments · Fixed by #15781
Assignees

Comments

@freihamer
Copy link

Environment details

  • Operating System+version: Ubuntu 20.04
  • Compiler+version:
  • Conan version: 2.0.17
  • Python version: 3.8

Steps to reproduce

For me, the package query option does not filter results as expected
conan list -r myrepo -p os=Linux "*"
Will still list all packages in myrepo, not only those that have Linux as os

Logs

No response

@memsharded memsharded self-assigned this Feb 29, 2024
@memsharded
Copy link
Member

memsharded commented Feb 29, 2024

Hi @lucabarbiero

Thanks for your question.

I am not sure what you mean. This seems to work fine:

(conan2_36) λ conan list -r=conancenter -p os=Linux "zlib/1.3:*"        
conancenter                                                             
  zlib                                                                  
    zlib/1.3                                                            
      revisions                                                         
        5c0f3a1a222eebb6bff34980bcd3e024 (2024-01-23 08:39:53 UTC)      
          packages                                                      
            abe5e2b04ea92ce2ee91bc9834317dbe66628206                    
              info                                                      
                settings                                                
                  ...                                 
                  os: Linux                                             
                                 
            b647c43bfefae3f830561ca202b6cfd935b56205                    
              info                                                      
                settings                                                
                  ...                              
                  os: Linux                                             
                                        
$ conan list -r=conancenter -p os=Windows "zlib/1.3:*"      
conancenter                                                             
  zlib                                                                  
    zlib/1.3                                                            
      revisions                                                         
        5c0f3a1a222eebb6bff34980bcd3e024 (2024-01-23 08:39:53 UTC)      
          packages                                                      
            ae9eaf478e918e6470fe64a4d8d4d9552b0b3606                    
              info                                                      
                settings                                                
                  ...                               
                  os: Windows                                           

If you are typing "*" that is not a pattern for binaries, that is a pattern for recipes. It will return all recipes in the repo.
Next Conan versions might actually throw an error for this case.

@freihamer
Copy link
Author

All right sorry I think my command would then be
conan list -r myrepo -p os=Linux "*:*"

Solved thanks

@memsharded
Copy link
Member

No prob, thanks for the feedback, it was still useful! 🙂

I am submitting PR #15781 that will raise an error message to explain the behavior, it will help other users with the same potential confusion.

@memsharded
Copy link
Member

#15781 merged, it will be in next 2.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants