Tag Archives: portage

The Dreaded Gentoo emerge -e @world

Not something I take lightly, nor is it something I look forward to doing.  In Gentoo the emerge “-e” means rebuild all packages installed on the system that portage has recorded.  A quick ‘equery -l “*”‘ will list all packages installed.

So why do I do this every year or so?  Just to make sure I have not messed something up over time.  It is not something I look forward to because the time from start to finish is measured not in hours, but days.  For example, it took my i7 laptop (1,400+) packages with SSDs and plenty of ram 24+ hours to finish.  However, in the end I was confident the system was in good shape.

So here are my tips at making this painful experience a little less painful.

1.  I start by getting the system in the best shape possible:

emerge -v –update –deep –newuse –with-bdeps=y –autounmask-write @world

If needed:

emerge @preserved-rebuild

then:

emerge –depclean

If you are paranoid careful then do:

python-updater

perl-cleaner –all

2. Next:  cd /var/log/portage/elog

You should find the file summary.log.  Rename it or delete it, whatever suites you.  Once the big emerge starts, all the messages will be logged to a new summary.log file.

2. Execute:   emerge -pve –keep-going @world

Note the “p” for pretend.  If everything is good then it should tell you that the Oracle Java packages need to be downloaded.  This is a good time to download them (I have Jre and jdk packages installed), move them to portage/distfiles, and do not forget:

chown portage:portage <file> 

to the files.  Make a mental note of the total number of packages to build.

3. Start by executing:  emerge -ve –keep-going @world

Why the keep-going? Because if everything is good after step 1 then any issues should be minor and this keeps from having to start the process from the beginning.

Now all there is to do is wait and hope for the best which usually does not help.  As the emerge progresses with each new package the typical package number X of Y (total) being processed.  So if you start with a total of 1,400 packages and later notice emerge outputting 20 of 800 then there has been a problem which has been skipped (note:  the –keep-going option).  Go check the summary.log file to find what the problem might have been.  The best part is that you should be able to fix it while the emerge -e keeps churning along.

Enjoy!

 

Gentoo Java emerge issue

Once again portage tells me there is an Oracle Java update and I already know it will have to be downloaded manually and moved into /usr/portage/distfiles. I do this, expecting everything to install without a hitch, but it does not. I get the dreaded “tar: This does not look like a tar archive” (see below) and I have forgot why this happens as usual. The solution is simple, the archive needs to belong to portage:

chown -R portage:portage /usr/portage/distfiles/jdk-7u71-linux-x64.tar.gz

&gt;&gt;&gt; Emerging (1 of 2) dev-java/oracle-jdk-bin-1.7.0.76::gentoo
* jdk-7u76-linux-x64.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ]
&gt;&gt;&gt; Unpacking source...
&gt;&gt;&gt; Unpacking jdk-7u76-linux-x64.tar.gz to /var/tmp/portage/dev-java/oracle-jdk-bin-1.7.0.76/work
gzip: /var/tmp/portage/dev-java/oracle-jdk-bin-1.7.0.76/distdir/jdk-7u76-linux-x64.tar.gz: Permission denied
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
* ERROR: dev-java/oracle-jdk-bin-1.7.0.76::gentoo failed (unpack phase):
* failure unpacking jdk-7u76-linux-x64.tar.gz
*
* Call stack:
* ebuild.sh, line 93: Called src_unpack
* environment, line 2563: Called default
* phase-functions.sh, line 770: Called default_src_unpack
* phase-functions.sh, line 797: Called __eapi0_src_unpack
* phase-helpers.sh, line 648: Called unpack 'jdk-7u76-linux-x64.tar.gz'
* phase-helpers.sh, line 357: Called __unpack_tar 'gzip -d'
* phase-helpers.sh, line 299: Called __assert_sigpipe_ok 'failure unpacking jdk-7u76-linux-x64.tar.gz'
* isolated-functions.sh, line 39: Called die
* The specific snippet of code:
* [[ $x -ne 0 &amp;&amp; $x -ne ${PORTAGE_SIGPIPE_STATUS:-141} ]] &amp;&amp; die "$@"
*
* If you need support, post the output of `emerge --info '=dev-java/oracle-jdk-bin-1.7.0.76::gentoo'`,
* the complete build log and the output of `emerge -pqv '=dev-java/oracle-jdk-bin-1.7.0.76::gentoo'`.
* The complete build log is located at '/var/tmp/portage/dev-java/oracle-jdk-bin-1.7.0.76/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/dev-java/oracle-jdk-bin-1.7.0.76/temp/environment'.
* Working directory: '/var/tmp/portage/dev-java/oracle-jdk-bin-1.7.0.76/work'
* S: '/var/tmp/portage/dev-java/oracle-jdk-bin-1.7.0.76/work/jdk1.7.0_76'
&gt;&gt;&gt; Failed to emerge dev-java/oracle-jdk-bin-1.7.0.76, Log file:
&gt;&gt;&gt; '/var/tmp/portage/dev-java/oracle-jdk-bin-1.7.0.76/temp/build.log'
* Messages for package dev-java/oracle-jdk-bin-1.7.0.76:
* ERROR: dev-java/oracle-jdk-bin-1.7.0.76::gentoo failed (unpack phase):
* failure unpacking jdk-7u76-linux-x64.tar.gz