How do I prevent errors relating to momentary loss of internet connection



I am trying to create an Entropy Package for Atom 1.2.4 using an ebuild I’ve written and the Portage package manager, but unfortunately my internet connection is seldom ever reliable so half way through each build (i.e., the stage of running script/build) I get an error, like:

Unable to download getaddrinfo ETIMEDOUT

at which point I lose all the progress I’ve made in building the package and have to start from the beginning. So I was wondering if there is some option I can pass to script/build so that it will retry to install the Atom package (one that is managed with apm, like in this error it was language-gfm) it gets stuck at, if such an error ever occurs. Just to be clear I know that when I install Atom manually from source code, if such an error occurs, all I’d have to do is re-run script/build to resume the build at the stage I got to before the error occurred, but building packages from ebuilds isn’t quite so simple.

Thanks for your time,


The “easiest” thing I can think of is to:

  1. Use the apm API documentation to create your own apm server
  2. Somehow point apm at the new server

Then use that to run your builds completely locally.