1 |
On Tuesday, April 5, 2016 3:19:59 AM CEST, William Hubbs wrote: |
2 |
[...] |
3 |
> I don't think creating usr merged stages would be that difficult. I |
4 |
> think it would just be a matter of creating a new version of baselayout |
5 |
> that puts these symlinks in place: |
6 |
> |
7 |
> /bin->usr/bin |
8 |
> /lib->usr/lib |
9 |
> /lib32->usr/lib32 |
10 |
> /lib64->usr/lib64 |
11 |
|
12 |
(OT: maybe it'd be a good oportunity to kill SYMLINK_LIB too :p) |
13 |
|
14 |
> /sbin->usr/bin |
15 |
> /usr/sbin->bin |
16 |
> |
17 |
> Once that is in place in a new baselayout, I think portage's colission |
18 |
> detection would be able to catch files that had the same names and were |
19 |
> originally in different paths when building the new stages. |
20 |
|
21 |
|
22 |
I think that prior to that we have to ensure that packages with intra |
23 |
collisions are not merged: What happens with current coreutils ebuilds that |
24 |
install, e.g., /bin/seq and a /usr/bin/seq symlink to it ? |
25 |
I haven't looked at the actual code, thus I can only assume there are no |
26 |
guarantees, which is definitely bad. |
27 |
|
28 |
|
29 |
> I put some thought also in how to nigrate live systems, and I'm not sure |
30 |
> what the best way to do that is. I wrote a script, which would do it in |
31 |
> theory, but I haven't tested because I only have one system and if |
32 |
> it breaks it the only way back would be to reinstall. |
33 |
|
34 |
|
35 |
Does it behave properly wrt portage's way of tracking of package files? I |
36 |
remember that modifying files owned by portage used to cause issues. |
37 |
|
38 |
What should baselayout ebuild do on systems that have not run that script ? |
39 |
|
40 |
Also, I think your script may not work: |
41 |
|
42 |
# copy binaries |
43 |
for dir in /bin /sbin /usr/sbin; do |
44 |
run_command cp -a $dir/* /usr/bin |
45 |
done |
46 |
|
47 |
---> Here it is important to ensure nothing /usr/bin/ is a symlink to /bin, |
48 |
otherwise this would just copy, e.g., /bin/seq onto /bin/seq |
49 |
|
50 |
|
51 |
# Create the /usr merge compatibility symlinks |
52 |
for dir in /bin /sbin; do |
53 |
run_command rm -rf $dir |
54 |
|
55 |
---> where are the 'ln' and 'rm' taken from after this step ? |
56 |
If this fails here, you're also leaving the system in a broken state. |
57 |
|
58 |
run_command ln -s usr/bin $dir |
59 |
done |