Sabayon / devkit

5 stars 8 forks source link

calculate_missing depth=2 causes all virtual dependencies to be installed #4

Closed optiz0r closed 8 years ago

optiz0r commented 8 years ago

The call to calculate_missing uses a hard-coded depth parameter or 2. When one of the packages being installed by builder has a direct dependency on a virtual./* package, this causes undesirable behaviour. The fist level dependency of the desired atom is the virtual itself. The second level dependency of the virtual are all the packages that could potentially satisfy the virtual.

This means every time builder runs, it installs every single possible satisfying package of the virtual one at a time. Each subsequent dependency that gets installed removes the previously installed one because of a conflict/substitution. This is a massive waste of time/bandwidth/effort.

I'm sure depth=2 was set for a good reason, but I don't know what that was. What's the cost of changing this to depth=1?

mudler commented 8 years ago

At the beginning depth=1 was the default, but after a lot of round of testing i noticed that then, in the other phases what happens is that emerge will compile up stuff that isn't required that is available on Entropy. For example, metapackages, if you want to compile a metapackage, you will end up with emerging all the deps that are on Entropy anyway.

What about setting this with an env var? --install and --remove would be handy in cases when you could explicitly tell equo what to install and remove, and with the combination of being able to tweak the depth with env var should cover edge cases as well

mudler commented 8 years ago

closing, this is solved now thanks https://github.com/Sabayon/devkit/commit/967cd9708a1db4f89904ab847df9126829f85bd1