3

Let's suppose in Gentoo Linux I'm emerging a lot of packages with parallel emerging enabled, and one of them fails because compiling its source code takes a lot of RAM, so the compiler ran into an out-of-memory and got axed; this probably happened because the offending package was not the only one that was being built, so if I emerge that package individually, it might build without problems. So I want to emerge only that one package, and then resume the rest of my big previous emerge once it's done. How can I do it?

I've seen some solutions posted online such as saving the resume list to a file and then loading it into emerge, but these solutions don't seem to be the best (that one solution didn't seem to support parallel emerging). Ideally, the best solution should allow for issuing emerge --resume to continue the previous emerge after installing the offending package individually.

  • You may find the --keep-going=y emerge option useful. – Francesco Turco Sep 5 '16 at 18:13
  • The "previous emerge" is lost when you emerge the offending package, therefore you can do no emerges after the crash or --resume reports Nothing to emerge. Saving the resume file is a viable option, but @FrancescoTurco commented --keep-going=y will do what it can after the failure occurs. There is also --skipfirst, and this works, if you issue a resume immediately after the offending package, as that package and subsequently, packages that depend on it, are skipped. – eyoung100 Sep 6 '16 at 16:37
1

It would depend on how are you specifying this list of packages you're emerging. If it's done by specifying a package or a set that pulls in a lot of dependencies, you would build the problematic package and then just run the same command again. In that case emerge will not install packages that are already merged.

If however you are doing a less likely thing and specifying the list of packages by hand in command line, you would have to remove the already merged packages from the list by hand. Because as far as I know, there are no parameters that would exclude already merged stuff.

Perhaps some magic could be done with gentoolkit or some other helper app from portage-tools, but unfortunately I'm not very familiar with those.

1
emerge ...
# fail
ebuild <PORTDIR>/<package_that_failed>.ebuild merge
emerge --resume

not tested, but should work

  • This is the solution I use, it also gets around most of the silly cyclic dependency problems, where portage thinks something will fail that won't. Manually ebuild the newer version of the blocker, then retry the emerge. It usually works, and will only make changes to the system if the package compiles. – Perkins Oct 28 '18 at 7:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.