diff --git a/conans/model/info.py b/conans/model/info.py index 6d51fddf7ac..e454a3f753a 100644 --- a/conans/model/info.py +++ b/conans/model/info.py @@ -97,31 +97,41 @@ def unrelated_mode(self): def semver_mode(self): self.name = self._ref.name self.version = _VersionRepr(self._ref.version).stable() - self.user = self.channel = self.package_id = None + self.user = self._ref.user + self.channel = self._ref.channel + self.package_id = None self.recipe_revision = None def full_version_mode(self): self.name = self._ref.name self.version = self._ref.version - self.user = self.channel = self.package_id = None + self.user = self._ref.user + self.channel = self._ref.channel + self.package_id = None self.recipe_revision = None def patch_mode(self): self.name = self._ref.name self.version = _VersionRepr(self._ref.version).patch() - self.user = self.channel = self.package_id = None + self.user = self._ref.user + self.channel = self._ref.channel + self.package_id = None self.recipe_revision = None def minor_mode(self): self.name = self._ref.name self.version = _VersionRepr(self._ref.version).minor() - self.user = self.channel = self.package_id = None + self.user = self._ref.user + self.channel = self._ref.channel + self.package_id = None self.recipe_revision = None def major_mode(self): self.name = self._ref.name self.version = _VersionRepr(self._ref.version).major() - self.user = self.channel = self.package_id = None + self.user = self._ref.user + self.channel = self._ref.channel + self.package_id = None self.recipe_revision = None def full_recipe_mode(self): diff --git a/conans/test/functional/graph/test_graph_build_mode.py b/conans/test/functional/graph/test_graph_build_mode.py index 323cc386364..e89ed9fcdba 100644 --- a/conans/test/functional/graph/test_graph_build_mode.py +++ b/conans/test/functional/graph/test_graph_build_mode.py @@ -26,8 +26,8 @@ def build_all(): foo_id = "efa83b160a55b033c4ea706ddb980cd708e3ba1b" -bar_id = "8dcbed6f1d74e477e5cb4c720cabe6c391d59ea0" -foobar_id = "a9ec6bebb0b06aa725ce41bcc07555b5a0630796" +bar_id = "7d0bb2b97d4339b0d3ded1418a2593f35b9cf267" +foobar_id = "af8f885f621ba7baac3f5b1d2c18cfdf5ba2550c" def check_if_build_from_sources(refs_modes, output): diff --git a/conans/test/integration/package_id/package_id_requires_modes_test.py b/conans/test/integration/package_id/package_id_requires_modes_test.py index 513e2ee1042..a0b9262d8f9 100644 --- a/conans/test/integration/package_id/package_id_requires_modes_test.py +++ b/conans/test/integration/package_id/package_id_requires_modes_test.py @@ -107,7 +107,7 @@ def test_version_full_version_schema(self): # but will look for the same package_id self.client.run("install .", assert_error=True) self.assertIn("ERROR: Missing binary: " - "hello2/2.3.8@lasote/stable:f25bd0cc2b8eec83e11ca16e79f4e43539cd93b9", + "hello2/2.3.8@lasote/stable:971e20f31a0d8deb18f03a0f8f72fd95623a8e29", self.client.out) # Now change the Hello version and build it, if we install out requires is @@ -248,17 +248,17 @@ def test_package_id_requires_patch_mode(self): self._export("libd", "0.1.0", channel=channel, package_id_text=None, requires=["libc/0.1.0@user/testing"]) self.client.run("create . --name=libd --version=0.1.0 --user=user --channel=testing", assert_error=True) - package_id_missing = "c4e90f390819b782c27ad290de6727acbcbc76bd" + package_id_missing = "18e1a54bf351cd291da5a01ef545ce338243285f" self.assertIn(f"""ERROR: Missing binary: libc/0.1.0@user/testing:{package_id_missing} libc/0.1.0@user/testing: WARN: Can't find a 'libc/0.1.0@user/testing' package binary '{package_id_missing}' for the configuration: [options] an_option=off [requires] -liba/0.1.0 -libb/0.1.0 -libbar/0.1.0 -libfoo/0.1.0""", self.client.out) +liba/0.1.0@user/testing +libb/0.1.0@user/testing +libbar/0.1.0@user/testing +libfoo/0.1.0@user/testing""", self.client.out) class PackageIDErrorTest(unittest.TestCase): diff --git a/conans/test/integration/py_requires/python_requires_test.py b/conans/test/integration/py_requires/python_requires_test.py index d662d542c35..07b92adb49b 100644 --- a/conans/test/integration/py_requires/python_requires_test.py +++ b/conans/test/integration/py_requires/python_requires_test.py @@ -1,5 +1,4 @@ import os -import re import textwrap import time import unittest @@ -728,7 +727,7 @@ def build(self): "python_requires2/1.0@user/test": "Cache"}, python=True) # - packages client.assert_listed_binary({"project/1.0@user/test": - ("1d71f9c410465b607aaf217320808237e019989f", "Build")}) + ("257a966344bb19ae8ef0c208eff085952902e25f", "Build")}) # - no mention to alias self.assertNotIn("alias", client.out)