1 |
On 2/25/21 5:31 PM, Grant Taylor wrote: |
2 |
> 10 have git switch to the next day |
3 |
> 20 emerge -aDUN @world |
4 |
> 30 assess / deal with masked packages |
5 |
> 40 goto 10 |
6 |
> |
7 |
> It /looks/ like things are working. |
8 |
|
9 |
*TL;DR* |
10 |
|
11 |
DenverCoder9: DEAR PEOPLE FROM THE FUTURE ... |
12 |
|
13 |
This method /does/ work. I have successfully brought the problem system |
14 |
from ~1 year old to ~current (Gentoo portage repo < 24 hours old). |
15 |
|
16 |
*Speed Bumps* |
17 |
|
18 |
These were the four things that caused the biggest slow down in this |
19 |
process. |
20 |
|
21 |
1) Source packages / ebuilds no longer available. |
22 |
- I found and downloaded files to DISTDIR. |
23 |
- I copied some ebuilds from older versions of portage to my local |
24 |
repo. |
25 |
2) make.profile not using PORTDIR definition in make.conf. |
26 |
- I ran into this while working on October ~ November '20 updates. |
27 |
3) PYTHON_TARGETS & PYTHON_SINGLE_TARGET |
28 |
- I ran into this after fixing #2. |
29 |
- I had to add the following to pull Python 3.6 back in so that |
30 |
things would work to add Python 3.7, before allowing the system to |
31 |
remove Python 3.6 (again). |
32 |
PYTHON_TARGETS="python2_7 python3_6 python3_7" |
33 |
PYTHON_SINGLE_TARGET="python3_7" |
34 |
4) Firefox & Thunderbird 68 disliking rust ≈ 1.48. |
35 |
- I had to give up on retaining version 68 of Firefox and Thunderbird. |
36 |
- The loss of some important extensions still really hurts. |
37 |
|
38 |
*How* |
39 |
|
40 |
The high level process that I used is a very close superset of what I |
41 |
hypothesized. |
42 |
|
43 |
10 have git switch to the next day |
44 |
20 emerge -DUN @world |
45 |
21 emerge --depclean --verbose n |
46 |
22 emerge @preserved-rebuild |
47 |
23 revdep-rebuild |
48 |
30 assess / deal with output from steps 20-23 |
49 |
40 goto 10 |
50 |
|
51 |
Steps 21-23 added mid-stream to make comparison to previous message simpler. |
52 |
|
53 |
All of these steps were in a function, `e3` (see attached file), which |
54 |
relied on one variable, `d`, the count of how many days to go backwards |
55 |
and set the date (`D`) to that everything should act on. |
56 |
|
57 |
Aside: The next version of e3 would probably store `d` in a file and |
58 |
subsequently re-load it from said file on each invocation. Thus |
59 |
eliminating the reliance on the environment variable. I would probably |
60 |
store this file in /var/tmp as /tmp and /dev/shm are cleared on boot. |
61 |
|
62 |
After gaining enough trust in the overall process, I ended up running |
63 |
the following while loop: |
64 |
|
65 |
while e3; true; done |
66 |
|
67 |
This allowed the system to stay busy emerging things up to the point |
68 |
that something failed and needed attention. |
69 |
|
70 |
*Setup* |
71 |
|
72 |
I did a `git clone` of the Gentoo portage repo. Currently ~6 GB. |
73 |
|
74 |
I then created the branches in the git repo with the following command |
75 |
(from inside of the git repo directory): |
76 |
|
77 |
for ((age=1; age<1024; age++)); do eval $(printf 'git log |
78 |
--pretty=format:"%%H %%cd" --date=format:%%Y-%%m-%%d\ %%H:%%M:%%S |
79 |
--after=%s --before=%s | fgrep -m1 %s' $(date +%Y-%m-%d -d "$(($age + |
80 |
1)) days ago") $(date +%Y-%m-%d -d "$(($age - 1)) days ago") $(date |
81 |
+%Y-%m-%d -d "$age days ago")) | read hash date time; time git checkout |
82 |
-b $date $hash; done |
83 |
|
84 |
Basically, this command starts at current; `stable`, and finds the first |
85 |
(most recent) commit for a given date and creates a branch, and works |
86 |
backwards for however many days configured; 1024 in the example. |
87 |
|
88 |
*Miscellany* |
89 |
|
90 |
I did `emerge -e @world` 3~5 times throughout the process just to make |
91 |
sure that everything was consistent. I will do this once more tomorrow |
92 |
after a full backup runs tonight. |
93 |
|
94 |
I did end up removing a small list of packages that were blocking emerge |
95 |
in one way or another. -- I decided that removing them to allow emerge |
96 |
to complete on it's own accord was more expedient than fighting them at |
97 |
the time. I will re-add them as necessary. |
98 |
|
99 |
- net-firewall/nftables |
100 |
- net-fs/ncpfs |
101 |
- media-gfx/gimp |
102 |
- dev-python/pycairo |
103 |
- dev-python/fido2 |
104 |
- net-analyzer/scapy |
105 |
- app-crypt/yubikey-manager |
106 |
|
107 |
Some of the packages were subsequently pulled back in. |
108 |
|
109 |
I did run into a bug with app-misc/pax-utils where I needed to add |
110 |
"-seccomp" for the package to be able to move forward. |
111 |
|
112 |
I also did the /usr/portage to /var/db/repos/gentoo et al. migration. |
113 |
|
114 |
"repo" can be ambiguous when there talking about both "Gentoo portage |
115 |
repo" and "git repo". Especially when the latter is managing the former. |
116 |
|
117 |
The following packages take what seems like F O R E V E R to emerge: |
118 |
|
119 |
- gcc |
120 |
- rust |
121 |
- Firefox |
122 |
- Thunderbird |
123 |
|
124 |
Link - xkcd - Wisdom of the Ancients (a.k.a. DenverCoder9) |
125 |
- https://xkcd.com/979/ |
126 |
|
127 |
*Summary* |
128 |
|
129 |
Yes, there are probably faster and / or more efficient processes to get |
130 |
a Gentoo system that's ~1 year behind caught up to current. But I did |
131 |
learn some things along the way. -- I tried to outline the toe |
132 |
stubbers so others can avoid them. |
133 |
|
134 |
Ultimately, I believe I have done in the last 11 days what would have |
135 |
been done over the course of the last ~year. Even 11 days is longer |
136 |
than necessary as I started with the while loop after getting to January |
137 |
of this year. In hindsight, I believe I could have used the while loop |
138 |
all along. |
139 |
|
140 |
I hope that I have included enough details for others to be able to |
141 |
reproduce this process if they need to. |
142 |
|
143 |
Now it's time to repeat this process to bring the two companion systems |
144 |
up to date. |
145 |
|
146 |
|
147 |
|
148 |
-- |
149 |
Grant. . . . |
150 |
unix || die |