Using conan 1.6.0 on ubuntu 16.04.
Here is the dependency graph :

And the output returned by conan info (I added the notation "(Private)" when it is the case) :
conan_info.txt
When calling conan infowith the -bo options to get what we have to rebuild in our graph, it outputs the following :
Command: conan info . -bo Concepts/1.0.0@common/stable -bo PackageG/0.1.0@common/stable
Returns: [Concepts/1.0.0@common/stable, Concepts/1.0.0@common/stable, Concepts/1.0.0@common/stable], [Math/0.3.0@common/stable, Math/0.3.0@common/stable, Math/0.3.0@common/stable], [PackageC/0.0.1@common/stable, PackageG/0.1.0@common/stable, PackageN/1.0.0@common/stable]
As you can see, some packages are duplicated, hence in our CI theses packages are built multiple times unnecessarily.
If needed, I can provide the recipes.
Ouch, I made another test, and it gets even worse, the build order is completly broken.
Here is the command on this graph:
conan info . -bo Catch/2.2.3@common/stable
Here is the output:
[Catch/2.2.3@common/stable, Catch/2.2.3@common/stable, Catch/2.2.3@common/stable], [Catch/2.2.3@common/stable, Catch/2.2.3@common/stable, Catch/2.2.3@common/stable, Catch/2.2.3@common/stable, Concepts/1.0.0@common/stable, Concepts/1.0.0@common/stable, Concepts/1.0.0@common/stable], [Algorithms/0.1.0@common/stable, Catch/2.2.3@common/stable, Catch/2.2.3@common/stable, Catch/2.2.3@common/stable, Catch/2.2.3@common/stable, Math/0.3.0@common/stable, Math/0.3.0@common/stable, Math/0.3.0@common/stable], [Algorithms/0.1.0@common/stable, PackageC/0.0.1@common/stable, PackageG/0.1.0@common/stable, PackageN/1.0.0@common/stable]
If I remove the duplicates to see better:
[Catch/2.2.3@common/stable], [Catch/2.2.3@common/stable, Concepts/1.0.0@common/stable], [Algorithms/0.1.0@common/stable, Catch/2.2.3@common/stable, Math/0.3.0@common/stable], [Algorithms/0.1.0@common/stable, PackageC/0.0.1@common/stable, PackageG/0.1.0@common/stable, PackageN/1.0.0@common/stable]
In the first group, packages are ok.
In the second group, Catch shouldn't appear as it is required by Concepts, moreover it has already been built in the first group.
The same goes for the third.
The fourth is ok.
Hi @dkgs
Yes, it seems there is an issue with the latest changes in the graph model, now that it is able to represent the build requires in it. I'll check what can be done asap, thanks very much for reporting.
I have submitted a PR in https://github.com/conan-io/conan/pull/3272, that aims to fix this regression.
The overall model for build-order still has some issues, but they were already existing in previous versions too, that is not a regression.
It would be great if you could try running from sources from my branch, against your project, to verify that everything is ok. Many thanks!
Hi @memsharded, thanks for the investigation !
Unfortunately, I can't have a Python dev environment, is it possible for you to release a .deb for linux x86_64 of your branch ?
This has been merged into 1.6.1, will be released soon.
Just tested with 1.6.1, got the output:
[Catch/2.2.3@common/stable], [Concepts/1.0.0@common/stable], [Algorithms/0.1.0@common/stable, Math/0.3.0@common/stable], [PackageC/0.0.1@common/stable, PackageG/0.1.0@common/stable, PackageN/1.0.0@common/stable]
Just like expected ! Thanks :+1:
Most helpful comment
Just tested with 1.6.1, got the output:
[Catch/2.2.3@common/stable], [Concepts/1.0.0@common/stable], [Algorithms/0.1.0@common/stable, Math/0.3.0@common/stable], [PackageC/0.0.1@common/stable, PackageG/0.1.0@common/stable, PackageN/1.0.0@common/stable]Just like expected ! Thanks :+1: