»emerge --resume« does not work as expected.
A »emerge -aetv world« that I started yesterday at noon (!!!) and that now was at 860 of 1304 packages, stopped because a bug in the glibc package (unrelated to this bug). To fix it, I had to create a new patched package for glibc in the local repository.
Now simply running »emerge --resume« did not recalculate and because of that did not find the new glibc ebuild.
So, because I knew that emerge supports two levels of resuming, I ran »emerge -a1tv glibc«, which would have worked, if the patch I got told to use would not have been buggy. Ok, no problem. I fixed the bug in the patch, and ran »emerge --resume«, expecting the glibc job to run again. Which it did. But it failed again (still buggy patch). This time I gave up, and deleted my custom ebuild complete with the patch and the directory.
Now I planned to get back to the first emerge job (the giant emptytree one), by resuming the glibc job, which should do nothing and finish. And then resuming the emptytree job. So I ran »emerge --resume« once, and it happily told me that there was nothing to do anymore.
And now the odd part: When I ran the second »emerge --resume«, it still told me that there was nothing to do. I even tried it some more times, to be sure.
But *the whole giant halfway-done emptytree job was gone*!!!
This is clearly a very bad problem. I just lost nearly two days of compiling, and don’t know how to resume that first one. (Doing a pretend emptytree, filtering out all the packages that got logged to be emerged in the first one, and feeding that to a new emerge? Uggh…)
Frankly, I must say that… I HATE that bug :/
I can write Python, but I don’t know the internals of portage, so I really can’t fix this thing myself without investing even *more* time in it. :/
I hope you understand how much this frustrates me. :)
And I also hope someone of you portage developers can add some more levels or resuming. After all, it should be a generic algorithm — not limited to a number of levels — anyway, right? ^^
And I would be even more thankful, if someone knew a way to resume that first »emerge -e world«. I, for one, will go to bed now (00:20h here). :)
Steps to Reproduce:
If you have portage-2.2_rc* then you can use AgeSet as described in bug 247106, comment #2. Otherwise, you do something equivalent like this:
emerge -1 $(find /var/db/pkg -name COUNTER -mtime +1 | \
sed -e 's:^/var/db/pkg:=:' -s 's:/COUNTER::')
(In reply to comment #1)
> If you have portage-2.2_rc* then you can use AgeSet as described in bug 247106, comment #2.
Not really a solution. I have no idea how I’d use that to get it to emerge only not emerged, 4 emerges ago, for example.
It would make more sense if you could do this:
emerge something else
emerge a package that fixes both fails
emerge --resume # finishes “something else”
emerge --resume # finishes “something”
I don’t understand why resume has only two levels anyway. Sounds like a ugly hack. Or else it would have unlimited levels.
> Otherwise, you do something equivalent like this:
> emerge -1 $(find /var/db/pkg -name COUNTER -mtime +1 | \
> sed -e 's:^/var/db/pkg:=:' -s 's:/COUNTER::')
sed: can’t read s:/COUNTER:: : File or directory not found
(Translated from German)