1 |
Hi Grant, |
2 |
|
3 |
On 2021-06-02 15:22, Grant Edwards wrote: |
4 |
> The order of package bilds often seems to be quite different after the |
5 |
> interruption than it was the first time -- often X is a fair ways down |
6 |
> the list. |
7 |
> |
8 |
> Why is that? |
9 |
|
10 |
it might possibly be related to hash randomization. I experienced a |
11 |
similar "problem" during work some time ago, where I couldn't reliably |
12 |
compare a set of values with a predefined list, without sorting it |
13 |
first. |
14 |
|
15 |
You can try the following Bash script to demonstrate the effects of hash |
16 |
randomization in Python: |
17 |
|
18 |
for _ in {1..5}; do python -c "print(set(['a', 'b', 'c']))"; done |
19 |
|
20 |
Chances are high that you will get five completely differently sorted |
21 |
sets. |
22 |
|
23 |
Since Portage is programmed in Python, it might be the same effect here, |
24 |
the packages are built up in a set or a dictionary and are therfore |
25 |
affected by the random seed. |
26 |
|
27 |
More information and pointers on this topic can be found in the Python |
28 |
documentation: https://docs.python.org/3/using/cmdline.html#cmdoption-r |
29 |
|
30 |
-- |
31 |
Regards and all the best |
32 |
|
33 |
Flo |