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

Fix openssl old version access to shared option of zlib #12302

Merged
merged 6 commits into from
Aug 19, 2022

Conversation

czoido
Copy link
Contributor

@czoido czoido commented Aug 17, 2022

This access to the cpp_info was creating a new config shared in that object and that finally turned into this error for some users: conan-io/conan#11856

@conan-center-bot

This comment has been minimized.

@ghost
Copy link

ghost commented Aug 17, 2022

I detected other pull requests that are modifying openssl/1.x.x recipe:

This message is automatically generated by https://github.com/ericLemanissier/conan-center-conflicting-prs so don't hesitate to report issues/improvements there.

@conan-center-bot

This comment has been minimized.

@jgsogo
Copy link
Contributor

jgsogo commented Aug 18, 2022

Linter output says:

Run echo "::add-matcher::linter/recipe_linter.json"
************* Module conanfile
recipes/openssl/1.x.x/conanfile.py:615: [W[14](https://github.com/conan-io/conan-center-index/runs/7882488367?check_suite_focus=true#step:8:15)01(anomalous-backslash-in-string), ] Anomalous backslash in string: '\$'. String constant might be missing an r prefix.
recipes/openssl/1.x.x/conanfile.py:4: [E0611(no-name-in-module), ] No name 'ConanInvalidConfiguration' in module 'conans.errors'
recipes/openssl/1.x.x/conanfile.py:5: [W9006(conan-import-conanfile), ] Import ConanFile from new module: `from conan import ConanFile`. Old import is deprecated in Conan v2.
recipes/openssl/1.x.x/conanfile.py:16: [R0205(useless-object-inheritance), OpenSSLVersion] Class 'OpenSSLVersion' inherits from object, can be safely removed from bases in python3
recipes/openssl/1.x.x/conanfile.py:41: [C0209(consider-using-f-string), OpenSSLVersion.base] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:59: [R1705(no-else-return), OpenSSLVersion.compare] Unnecessary "elif" after "return", remove the leading "el" from "elif"
recipes/openssl/1.x.x/conanfile.py:230: [C0121(singleton-comparison), OpenSSLConan.requirements] Comparison 'self.options.get_safe('no_zlib') == False' should be 'self.options.get_safe('no_zlib') is False' if checking for the singleton value False, or 'not self.options.get_safe('no_zlib')' if testing for falsiness
recipes/openssl/1.x.x/conanfile.py:259: [C0209(consider-using-f-string), OpenSSLConan._target] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:275: [R1705(no-else-return), OpenSSLConan._perlasm_scheme] Unnecessary "elif" after "return", remove the leading "el" from "elif"
recipes/openssl/1.x.x/conanfile.py:292: [R1710(inconsistent-return-statements), OpenSSLConan._asm_target] Either all return statements in a function should return an expression, or none of them should.
recipes/openssl/1.x.x/conanfile.py:327: [C0209(consider-using-f-string), OpenSSLConan._targets] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:328: [C0209(consider-using-f-string), OpenSSLConan._targets] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:329: [C0209(consider-using-f-string), OpenSSLConan._targets] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:330: [C0209(consider-using-f-string), OpenSSLConan._targets] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:356: [C0209(consider-using-f-string), OpenSSLConan._targets] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:357: [C0209(consider-using-f-string), OpenSSLConan._targets] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:358: [C0209(consider-using-f-string), OpenSSLConan._targets] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:359: [C0209(consider-using-f-string), OpenSSLConan._targets] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:380: [C0209(consider-using-f-string), OpenSSLConan._targets] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:381: [C0209(consider-using-f-string), OpenSSLConan._targets] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:382: [C0209(consider-using-f-string), OpenSSLConan._targets] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:386: [C0209(consider-using-f-string), OpenSSLConan._targets] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:387: [C0209(consider-using-f-string), OpenSSLConan._targets] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:388: [C0209(consider-using-f-string), OpenSSLConan._targets] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:398: [C0209(consider-using-f-string), OpenSSLConan._targets] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:399: [C0209(consider-using-f-string), OpenSSLConan._targets] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:400: [C0209(consider-using-f-string), OpenSSLConan._targets] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:402: [C0209(consider-using-f-string), OpenSSLConan._targets] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:403: [C0209(consider-using-f-string), OpenSSLConan._targets] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:404: [C0209(consider-using-f-string), OpenSSLConan._targets] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:433: [C0206(consider-using-dict-items), OpenSSLConan._ancestor_target] Consider iterating with .items()
recipes/openssl/1.x.x/conanfile.py:466: [C0209(consider-using-f-string), OpenSSLConan._patch_makefile_org] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:468: [C0209(consider-using-f-string), OpenSSLConan._patch_makefile_org] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:470: [C0209(consider-using-f-string), OpenSSLConan._patch_makefile_org] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:473: [C0209(consider-using-f-string), OpenSSLConan._patch_makefile_org] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:475: [C0209(consider-using-f-string), OpenSSLConan._patch_makefile_org] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:477: [C0209(consider-using-f-string), OpenSSLConan._patch_makefile_org] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:495: [C0209(consider-using-f-string), OpenSSLConan._configure_args] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:497: [C0209(consider-using-f-string), OpenSSLConan._configure_args] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:498: [C0209(consider-using-f-string), OpenSSLConan._configure_args] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:503: [C0209(consider-using-f-string), OpenSSLConan._configure_args] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:512: [C0209(consider-using-f-string), OpenSSLConan._configure_args] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:537: [C0209(consider-using-f-string), OpenSSLConan._configure_args] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:549: [C0209(consider-using-f-string), OpenSSLConan._configure_args] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:550: [C0209(consider-using-f-string), OpenSSLConan._configure_args] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:556: [C0209(consider-using-f-string), OpenSSLConan._configure_args] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:490: [R0912(too-many-branches), OpenSSLConan._configure_args] Too many branches (21/12)
recipes/openssl/1.x.x/conanfile.py:560: [R0914(too-many-locals), OpenSSLConan._create_targets] Too many local variables (18/[15](https://github.com/conan-io/conan-center-index/runs/7882488367?check_suite_focus=true#step:8:16))
recipes/openssl/1.x.x/conanfile.py:593: [C0209(consider-using-f-string), OpenSSLConan._create_targets] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:595: [C0209(consider-using-f-string), OpenSSLConan._create_targets] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:596: [C0209(consider-using-f-string), OpenSSLConan._create_targets] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:597: [C0209(consider-using-f-string), OpenSSLConan._create_targets] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:599: [C0209(consider-using-f-string), OpenSSLConan._create_targets] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:600: [C0209(consider-using-f-string), OpenSSLConan._create_targets] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:602: [C0209(consider-using-f-string), OpenSSLConan._create_targets] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:607: [C0209(consider-using-f-string), OpenSSLConan._create_targets] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:609: [C0209(consider-using-f-string), OpenSSLConan._create_targets] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:636: [C0209(consider-using-f-string), OpenSSLConan._create_targets] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:657: [C0209(consider-using-f-string), OpenSSLConan._run_make] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:664: [R[17](https://github.com/conan-io/conan-center-index/runs/7882488367?check_suite_focus=true#step:8:18)05(no-else-return), OpenSSLConan._perl] Unnecessary "elif" after "return", remove the leading "el" from "elif"
recipes/openssl/1.x.x/conanfile.py:685: [C0[20](https://github.com/conan-io/conan-center-index/runs/7882488367?check_suite_focus=true#step:8:21)9(consider-using-f-string), OpenSSLConan._make] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:7[22](https://github.com/conan-io/conan-center-index/runs/7882488367?check_suite_focus=true#step:8:23): [R1705(no-else-return), OpenSSLConan._cc] Unnecessary "elif" after "return", remove the leading "el" from "elif"
recipes/openssl/1.x.x/conanfile.py:737: [C0209(consider-using-f-string), OpenSSLConan._make_context.sanitize_env_var] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:751: [C0209(consider-using-f-string), OpenSSLConan.build] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:786: [C0209(consider-using-f-string), OpenSSLConan._replace_runtime_in_file] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:786: [C0209(consider-using-f-string), OpenSSLConan._replace_runtime_in_file] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:787: [C0209(consider-using-f-string), OpenSSLConan._replace_runtime_in_file] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:787: [C0209(consider-using-f-string), OpenSSLConan._replace_runtime_in_file] Formatting a regular string which could be a f-string
recipes/openssl/1.x.x/conanfile.py:857: [C0209(consider-using-f-string), OpenSSLConan._module_file_rel_path] Formatting a regular string which could be a f-string
Error: Process completed with exit code [30](https://github.com/conan-io/conan-center-index/runs/7882488367?check_suite_focus=true#step:8:31).

At least there is one error:

recipes/openssl/1.x.x/conanfile.py:4: [E0611(no-name-in-module), ] No name 'ConanInvalidConfiguration' in module 'conans.errors'

The bot won't merge the PR, this check_run is required.

@jgsogo
Copy link
Contributor

jgsogo commented Aug 18, 2022

Now it is green 😸

image

Copy link
Member

@uilianries uilianries left a comment

Choose a reason for hiding this comment

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

LGTM

@czoido
Copy link
Contributor Author

czoido commented Aug 18, 2022

Now it is green 😸

image

Great!

For me there are to things that I think could confuse users. First that the build continues after the linter fails, and second that some errors are shown in boxes in the code which is great and have more visibility and other like the ConanInvalidConfiguration one are between other warnings and are not so visible. Anyway, maybe it's just my impression.

@jgsogo
Copy link
Contributor

jgsogo commented Aug 18, 2022

btw, you can also consider fixing the rest of the linter warnings. Now is better than later 🙄

Copy link
Contributor

@jcar87 jcar87 left a comment

Choose a reason for hiding this comment

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

LGTM!

@conan-center-bot
Copy link
Collaborator

All green in build 6 (4dd573875c9a0ffedc67a0e808a5c08024d182f1):

  • openssl/1.1.1p@:
    All packages built successfully! (All logs)

    🔸 Informative: This recipe is not ready for Conan v2

    We have started the migration process to Conan v2 and exporting recipes successfully will be required in the future.
    This is just an informative note to gain awareness about the process, no need to take any action. The plan is to enforce smaller steps that are easier to fix and, eventually, this conan export step will work.
    See the recipe migration guide to know more about the changes required.

    ERROR: Error loading conanfile at '/home/conan/w/prod_cci_PR-12302/recipes/openssl/1.x.x/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-12302/recipes/openssl/1.x.x/conanfile.py
      File "<frozen importlib._bootstrap_external>", line 728, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/home/conan/w/prod_cci_PR-12302/recipes/openssl/1.x.x/conanfile.py", line 5, in <module>
        from conans import ConanFile, AutoToolsBuildEnvironment, tools
    ImportError: cannot import name 'ConanFile' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    
  • openssl/1.1.1q@:
    All packages built successfully! (All logs)

    🔸 Informative: This recipe is not ready for Conan v2

    We have started the migration process to Conan v2 and exporting recipes successfully will be required in the future.
    This is just an informative note to gain awareness about the process, no need to take any action. The plan is to enforce smaller steps that are easier to fix and, eventually, this conan export step will work.
    See the recipe migration guide to know more about the changes required.

    ERROR: Error loading conanfile at '/home/conan/w/prod_cci_PR-12302/recipes/openssl/1.x.x/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-12302/recipes/openssl/1.x.x/conanfile.py
      File "<frozen importlib._bootstrap_external>", line 728, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/home/conan/w/prod_cci_PR-12302/recipes/openssl/1.x.x/conanfile.py", line 5, in <module>
        from conans import ConanFile, AutoToolsBuildEnvironment, tools
    ImportError: cannot import name 'ConanFile' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    
  • openssl/1.0.2u@:
    All packages built successfully! (All logs)

    🔸 Informative: This recipe is not ready for Conan v2

    We have started the migration process to Conan v2 and exporting recipes successfully will be required in the future.
    This is just an informative note to gain awareness about the process, no need to take any action. The plan is to enforce smaller steps that are easier to fix and, eventually, this conan export step will work.
    See the recipe migration guide to know more about the changes required.

    ERROR: Error loading conanfile at '/home/conan/w/prod_cci_PR-12302/recipes/openssl/1.x.x/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-12302/recipes/openssl/1.x.x/conanfile.py
      File "<frozen importlib._bootstrap_external>", line 728, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/home/conan/w/prod_cci_PR-12302/recipes/openssl/1.x.x/conanfile.py", line 5, in <module>
        from conans import ConanFile, AutoToolsBuildEnvironment, tools
    ImportError: cannot import name 'ConanFile' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    
  • openssl/1.1.1o@:
    All packages built successfully! (All logs)

    🔸 Informative: This recipe is not ready for Conan v2

    We have started the migration process to Conan v2 and exporting recipes successfully will be required in the future.
    This is just an informative note to gain awareness about the process, no need to take any action. The plan is to enforce smaller steps that are easier to fix and, eventually, this conan export step will work.
    See the recipe migration guide to know more about the changes required.

    ERROR: Error loading conanfile at '/home/conan/w/prod_cci_PR-12302/recipes/openssl/1.x.x/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-12302/recipes/openssl/1.x.x/conanfile.py
      File "<frozen importlib._bootstrap_external>", line 728, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/home/conan/w/prod_cci_PR-12302/recipes/openssl/1.x.x/conanfile.py", line 5, in <module>
        from conans import ConanFile, AutoToolsBuildEnvironment, tools
    ImportError: cannot import name 'ConanFile' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    
  • openssl/1.1.0l@:
    All packages built successfully! (All logs)

    🔸 Informative: This recipe is not ready for Conan v2

    We have started the migration process to Conan v2 and exporting recipes successfully will be required in the future.
    This is just an informative note to gain awareness about the process, no need to take any action. The plan is to enforce smaller steps that are easier to fix and, eventually, this conan export step will work.
    See the recipe migration guide to know more about the changes required.

    ERROR: Error loading conanfile at '/home/conan/w/prod_cci_PR-12302/recipes/openssl/1.x.x/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-12302/recipes/openssl/1.x.x/conanfile.py
      File "<frozen importlib._bootstrap_external>", line 728, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/home/conan/w/prod_cci_PR-12302/recipes/openssl/1.x.x/conanfile.py", line 5, in <module>
        from conans import ConanFile, AutoToolsBuildEnvironment, tools
    ImportError: cannot import name 'ConanFile' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    

@conan-center-bot conan-center-bot merged commit 5cef0b1 into conan-io:master Aug 19, 2022
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.

7 participants