Repository: conan-io/conan

Issue:
package_id() regression bug in conan 1.4.x?
Consider the following `conanfile.py`:
```python
from conans import ConanFile

class TestConan(ConanFile):
    name = "Test"
    version = "0.0.1"
    settings = "os", "arch"

    def package_id(self):
        self.info.include_build_settings()
        self.info.settings.os_build = self.info.settings.os
        self.info.settings.arch_build = self.info.settings.arch
        del self.info.settings.os
        del self.info.settings.arch
        print(">>>>>>>>>>>>>>>>>>>>>>>>>>>> os_build: ",str(self.info.settings.os_build))
        print(">>>>>>>>>>>>>>>>>>>>>>>>>>>> arch_build: ",str(self.info.settings.arch_build))
```

Now test it with conan 1.3.3:
```
C:\Users\dbely\conan\conan-test>pip install conan==1.3.3
...
C:\Users\dbely\conan\conan-test>conan create . dbely/testing
...
Test/0.0.1@dbely/testing: The stored package has not changed
>>>>>>>>>>>>>>>>>>>>>>>>>>>> os_build:  Windows
>>>>>>>>>>>>>>>>>>>>>>>>>>>> arch_build:  x86_64
Test/0.0.1@dbely/testing: Installing package
...
C:\Users\dbely\conan\conan-test>conan search Test/0.0.1@dbely/testing
Existing packages for recipe Test/0.0.1@dbely/testing:

    Package_ID: 456f15897172eef340fcbac8a70811f2beb26a93
        [settings]
            arch_build: x86_64
            os_build: Windows
        Outdated from recipe: False
```
Everything is good. Upgrade to conan 1.4.4 (all 1.4.x versions behave the same) and try again:
```
C:\Users\dbely\conan\conan-test>pip install conan==1.4.4
...
C:\Users\dbely\conan\conan-test>conan create . dbely/testing
...
Test/0.0.1@dbely/testing: A new conanfile.py version was exported
Test/0.0.1@dbely/testing: Folder: C:\Users\dbely\.conan\data\Test\0.0.1\dbely\testing\export
>>>>>>>>>>>>>>>>>>>>>>>>>>>> os_build:  Windows
>>>>>>>>>>>>>>>>>>>>>>>>>>>> arch_build:  x86_64
Test/0.0.1@dbely/testing: Installing package
>>>>>>>>>>>>>>>>>>>>>>>>>>>> os_build:  None
>>>>>>>>>>>>>>>>>>>>>>>>>>>> arch_build:  None
...
C:\Users\dbely\conan\conan-test>conan search Test/0.0.1@dbely/testing
Existing packages for recipe Test/0.0.1@dbely/testing:

    Package_ID: 456f15897172eef340fcbac8a70811f2beb26a93
        [settings]
            arch_build: None
            os_build: None
        Outdated from recipe: False
```
Oops! `package_id()` is now called twice and after the second call `os_build` and `arch_build` are set to `None`. Looks like a bug to me. 


Discussion:
Thanks, yes, it looks like. Will report asap.

Resolving patch:
diff --git a/conans/client/graph/printer.py b/conans/client/graph/printer.py
--- a/conans/client/graph/printer.py
+++ b/conans/client/graph/printer.py
@@ -7,7 +7,7 @@ def print_graph(deps_graph, out):
     all_nodes = []
     ids = set()
     for node in sorted(n for n in deps_graph.nodes if n.conan_ref):
-        package_id = PackageReference(node.conan_ref, node.conanfile.package_id())
+        package_id = PackageReference(node.conan_ref, node.conanfile.info.package_id())
         if package_id not in ids:
             all_nodes.append(node)
             ids.add(package_id)


Test patch:
diff --git a/conans/test/functional/package_id_test.py b/conans/test/functional/package_id_test.py
--- a/conans/test/functional/package_id_test.py
+++ b/conans/test/functional/package_id_test.py
@@ -3,6 +3,23 @@
 
 
 class PackageIdTest(unittest.TestCase):
+
+    def double_package_id_call_test(self):
+        # https://github.com/conan-io/conan/issues/3085
+        conanfile = """from conans import ConanFile
+
+class TestConan(ConanFile):
+    settings = "os", "arch"
+
+    def package_id(self):
+        self.output.info("Calling package_id()")
+"""
+        client = TestClient()
+        client.save({"conanfile.py": conanfile})
+        client.run("create . Pkg/0.1@user/testing")
+        out = str(client.out)
+        self.assertEqual(1, out.count("Pkg/0.1@user/testing: Calling package_id()"))
+
     def remove_option_setting_test(self):
         # https://github.com/conan-io/conan/issues/2826
         conanfile = """from conans import ConanFile