Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 478300

Summary: The 'portage reinstall' thing in environment's PATH refers to wrong PORTAGE_TMPDIR after resume of partial build
Product: Portage Development Reporter: Michał Górny <mgorny>
Component: CoreAssignee: Portage team <dev-portage>
Status: RESOLVED CANTFIX    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-07-26 23:03:42 UTC
I've got this in package.env:

  www-client/chromium heavycompiling

And this in env/heavycompiling:

  PORTAGE_TMPDIR=/var/tmp

The effect is that chromium is built in /var/tmp rather than /tmp. However, after rebooting the system and resuming the build (/tmp is tmpfs, /var/tmp is not) I am unable to finish the build because of:

  /var/tmp/portage/www-client/chromium-29.0.1547.32/temp/environment: line 4806:  doexe: command not found

In fact, looking at temp/environment file:

  declare -x PATH="/var/tmp/portage/www-client/chromium-29.0.1547.32/temp/python2.7/bin:/tmp/portage/._portage_reinstall_.TQDTxW/bin/ebuild-helpers/xattr:/tmp/portage/._portage_reinstall_.TQDTxW/bin/ebuild-helpers:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.1"

It seems that portage created a copy of helpers in /tmp while the build was performed in /var/tmp. As an effect, helpers were removed with reboot, build persisted.

I think the helper path should use the final PORTAGE_TMPDIR as well.
Comment 1 Zac Medico gentoo-dev 2013-07-26 23:15:04 UTC
(In reply to Michał Górny from comment #0)
> It seems that portage created a copy of helpers in /tmp while the build was
> performed in /var/tmp. As an effect, helpers were removed with reboot, build
> persisted.

Yes, because portage creates a temporary backup copy when updating itself, in order to avoid potential runtime compatibility issues between the new and old version.

> I think the helper path should use the final PORTAGE_TMPDIR as well.

This will not solve the "doexe: command not found" thing that you had after reboot, because portage removes the temporary copy of itself using an atexit hook.

You can avoid this kind of issue by updating portage by itself before you try to update/install any other packages.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-07-26 23:20:36 UTC
Let's CANTFIX it then.