Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 285012 - Portage’s multi-resume is broken. (Allow unlimited levels with »emerge --resume«.)
Summary: Portage’s multi-resume is broken. (Allow unlimited levels with »emerge --resu...
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All Linux
: High normal with 1 vote (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-14 22:22 UTC by Navid Zamani
Modified: 2011-06-21 11:33 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Navid Zamani 2009-09-14 22:22:55 UTC
»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). :)

Reproducible: Always

Steps to Reproduce:
Comment 1 Zac Medico gentoo-dev 2009-09-15 01:06:16 UTC
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::')
Comment 2 Navid Zamani 2010-03-21 14:43:33 UTC
(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
(fails)
emerge something else
(fails)
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)