Do `USE="doc" emerge -u portage` when portage-manpages is not installed and after portage is upgraded it will output "emerge: please tell me what to do." instead of continuing to install portage-manpages. This seems to be a side effect of the fix for bug 107865. This problem exists in both 2.0.53 and 2.0.54 (first brought to my attention by a comment on bug 108262).
Created attachment 76306 [details, diff] emerge-restart-resume.patch This patch uses the list of long options stored in "myopts" to generate a new argument list for the os.execv call. As before, selected "badlongopts" are filtered out. In addition, "--resume" is added to the arguments and the first item in the mtimedb mergelist (portage itself) is removed. Hopefully this will have the desired behavior while being less error prone than the previous approach. The patch applies to all versions of portage currently in the tree (2.0.51.22-r3 through 2.1_pre3-r1). Note that this bug is actually unrelated to bug 107865 (though symptoms initially led me to suspect they were related).
Thinking about it, --skipfirst should be added to badlongopts (or equivalently, leave portage in the mergelist and force --skipfirst intentionally). One drawback of my suggested approach is that it assumes the new version of portage will be able to read the mtimedb that was created by the old version (good assumption?).
This is now in trunk for release in portage-2.1_pre5.
*** Bug 124163 has been marked as a duplicate of this bug. ***
Released in 2.1_pre5.
*** Bug 39901 has been marked as a duplicate of this bug. ***