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

[package] msys2/cci.latest: most recent conanfile fix uses run() api from conan2.0 #26228

Open
devivoc opened this issue Dec 19, 2024 · 3 comments · May be fixed by #26230
Open

[package] msys2/cci.latest: most recent conanfile fix uses run() api from conan2.0 #26228

devivoc opened this issue Dec 19, 2024 · 3 comments · May be fixed by #26230
Assignees
Labels
bug Something isn't working

Comments

@devivoc
Copy link

devivoc commented Dec 19, 2024

Description

I ran into this same issue here and used the recent fix here

The fix updates the ConanFile.run() call and in doing so adds quiet = True. The quiet argument is not available until conan 2.0

I am on conan 1.60.0, and the msys2 build fails with the error

while calling '_do_build', line 157
        if self.run(f'bash -l -c "pacman -Qq {package}"', ignore_errors=True, quiet=True) == 0:
        TypeError: ConanFile.run() got an unexpected keyword argument 'quiet'

While the recommendation is to upgrade to conan 2.0, I imagine previous conan versions are still widely in use.

Package and Environment Details

  • Package Name/Version: msys2/cci.latest
  • Conan version: conan 1.60.0
  • Python version: Python 3.11.0

Conan profile

Configuration for profile default:

[settings]
os=Windows
os_build=Windows
arch=x86_64
arch_build=x86_64
compiler=Visual Studio
compiler.version=17
build_type=Debug
[options]
[conf]
[build_requires]
[env]

Steps to reproduce

conan install msys2/cci.latest@ --build

Logs

Error in build() method, line 142
        self._do_build()
while calling '_do_build', line 157
        if self.run(f'bash -l -c "pacman -Qq {package}"', ignore_errors=True, quiet=True) == 0:
        TypeError: ConanFile.run() got an unexpected keyword argument 'quiet'
@devivoc devivoc added the bug Something isn't working label Dec 19, 2024
@franramirez688 franramirez688 linked a pull request Dec 20, 2024 that will close this issue
@franramirez688 franramirez688 self-assigned this Dec 20, 2024
@franramirez688
Copy link
Contributor

franramirez688 commented Dec 20, 2024

Hi @devivoc

Thanks for reporting this. The problem is that this fix #25973 should have introduced the required_conan_version = ">=2.0.0" constraint as, you said above, that parameter was introduced in the Conan 2.0.0 version. I just proposed the PR #26230 to solve that.

While the recommendation is to upgrade to conan 2.0, I imagine previous conan versions are still widely in use.

You can definitely keep using Conan 1.x, but you have to take into account the announcement in our blog: Conan Center will stop receiving updates for Conan 1.x packages soon. In summary, all the PRs introduced in Conan Center since 4 November are very likely only compatible with Conan v2.x.

@franramirez688
Copy link
Contributor

Anyway, @devivoc if you need any help to migrate your recipe to Conan 2.x, I recommend:

  • Check our Migration guide.
  • Check our Conan v2 examples.
  • For sure, open any issues in Conan/ConanCenterIndex to get our help 😁 We will be pleased to help you.

@devivoc
Copy link
Author

devivoc commented Dec 20, 2024

I customize the conanfile for my own local deployment, so I was able to just remove that argument. Updating the required version in the conanfile is sufficient, just wanted to point this out. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants