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

Always indicate when patches are applied (#14165) #14177

Merged

Conversation

iskunk
Copy link
Contributor

@iskunk iskunk commented Jun 27, 2023

Changelog: Fix: Enable existing status-message code in the patch() function.
Docs: Omit

Close #14165

  • Refer to the issue that supports this Pull Request.
  • If the issue has missing info, explain the purpose/use case/pain/need that covers this Pull Request.
  • I've read the Contributing guide.
  • I've followed the PEP8 style guides for Python code.
  • I've opened another PR in the Conan docs repo to the develop branch, documenting this one.

@@ -39,7 +39,7 @@ def patch(conanfile, base_path=None, patch_file=None, patch_string=None, strip=0
:param kwargs: Extra parameters that can be added and will contribute to output information
"""

patch_type = kwargs.get('patch_type')
patch_type = kwargs.get('patch_type') or ("file" if patch_file else "string")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems this could be breaking the tests, other types like "backport" are being ovewrritten?
https://ci.conan.io/blue/organizations/jenkins/ConanTestSuitev2/detail/PR-14177/1/pipeline/9

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should respect any non-empty value of patch_type that gets passed in. I'm not familiar with the test output conventions, but isn't it complaining about the new/modified "Apply patch (file)" lines?

Remember, the old behavior was that patch_file without (patch_type or patch_description) printed nothing, and patch_type could be left unset and e.g. "(file)" would not be printed.

Also update test_patches.py accordingly.
@iskunk iskunk force-pushed the feature/apply-patches-verbose branch from 38a2252 to cb5fd1f Compare June 28, 2023 02:10
@memsharded memsharded merged commit f1b9c37 into conan-io:release/2.0 Jun 28, 2023
@memsharded
Copy link
Member

Fantastic, many thanks for your contribution! Merged, it will be next 2.0.8

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 this pull request may close these issues.

[feature] Verbose option for apply_conandata_patches()
2 participants