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

fail when using profile includes #574

Open
dvirtz opened this issue Aug 12, 2021 · 0 comments
Open

fail when using profile includes #574

dvirtz opened this issue Aug 12, 2021 · 0 comments

Comments

@dvirtz
Copy link
Contributor

dvirtz commented Aug 12, 2021

Description of Problem, Request, or Question

when using profile includes, as described in the docs and using docker, cpt doesn't find the included profile.

This seems to because the runner reads the profile before installing config

self._profile = load_profile(profile_abs_path, cache)

Alternatively, it could try to resolve the includes when setting CPT_PROFILE.

Environment Details

  • Conan Package Tools Version: 0.35.1
  • Operating System: Linux
  • Operation System Version: CentOS 7
  • Compiler+version: gcc-7
  • Docker image: conanio/gcc7
  • Conan version: 1.36.0
  • Python version: python 3.6.14

Steps to reproduce (Include if Applicable)

use a config in which a profile includes another one

include(base/centos7)

[settings]
compiler=gcc
compiler.libcxx=libstdc++11
compiler.version=7

Build logs (Include if Available)

Traceback (most recent call last):
  File "/opt/pyenv/versions/3.6.14/lib/python3.6/site-packages/conans/client/profile_loader.py", line 121, in read_profile
    return _load_profile(text, profile_path, default_folder)
  File "/opt/pyenv/versions/3.6.14/lib/python3.6/site-packages/conans/client/profile_loader.py", line 140, in _load_profile
    profile, included_vars = read_profile(include, cwd, default_folder)
  File "/opt/pyenv/versions/3.6.14/lib/python3.6/site-packages/conans/client/profile_loader.py", line 116, in read_profile
    profile_path = get_profile_path(profile_name, default_folder, cwd)
  File "/opt/pyenv/versions/3.6.14/lib/python3.6/site-packages/conans/client/profile_loader.py", line 104, in get_profile_path
    raise ConanException("Profile not found: %s" % profile_name)
conans.errors.ConanException: Profile not found: base/centos7

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/pyenv/versions/3.6.14/bin/run_create_in_docker", line 11, in <module>
    load_entry_point('conan-package-tools==0.35.1', 'console_scripts', 'run_create_in_docker')()
  File "/opt/pyenv/versions/3.6.14/lib/python3.6/site-packages/cpt/run_in_docker.py", line 64, in run
    lockfile=lockfile)
  File "/opt/pyenv/versions/3.6.14/lib/python3.6/site-packages/cpt/runner.py", line 65, in __init__
    self._profile = load_profile(profile_abs_path, cache)
  File "/opt/pyenv/versions/3.6.14/lib/python3.6/site-packages/cpt/profiles.py", line 88, in load_profile
    client_cache.profiles_path)
  File "/opt/pyenv/versions/3.6.14/lib/python3.6/site-packages/conans/client/profile_loader.py", line 140, in _load_profile
    profile, included_vars = read_profile(include, cwd, default_folder)
  File "/opt/pyenv/versions/3.6.14/lib/python3.6/site-packages/conans/client/profile_loader.py", line 125, in read_profile
    raise ConanException("Error reading '%s' profile: %s" % (profile_name, exc))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants