Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 669878 - $HOME content not preserved between phases
Summary: $HOME content not preserved between phases
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-28 16:54 UTC by Thomas Deutschmann (RETIRED)
Modified: 2022-07-28 05:03 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Deutschmann (RETIRED) gentoo-dev 2018-10-28 16:54:07 UTC
media-gfx/imagemagick creates ${HOME}/.config/ImageMagick/policy.xml in src_prepare which is later needed to pass test suite.

Today I experienced test failures due to missing policy.xml.

I was able to reproduce using the following ebuild https://gitweb.gentoo.org/repo/gentoo.git/tree/media-gfx/imagemagick/imagemagick-7.0.8.12.ebuild?id=80c6836737de4d7e52889e44a80ffcfd7e0b7f01 and the following commands:

>  # ebuild imagemagick-7.0.8.11.ebuild clean prepare
>  * ImageMagick-7.0.8-11.tar.xz BLAKE2B SHA512 size ;-) ...                                                       [ ok ]
> >>> Unpacking source...
> >>> Unpacking ImageMagick-7.0.8-11.tar.xz to /var/tmp/portage/media-gfx/imagemagick-7.0.8.11/work
> >>> Source unpacked in /var/tmp/portage/media-gfx/imagemagick-7.0.8.11/work
> >>> Preparing source in /var/tmp/portage/media-gfx/imagemagick-7.0.8.11/work/ImageMagick-7.0.8-11 ...
>  * policy.xml hardened
>  * Running elibtoolize in: ImageMagick-7.0.8-11/
>  *   Applying ppc64le/2.4.4 patch ...
>  * Running elibtoolize in: ImageMagick-7.0.8-11/config/
>  *   Applying portage/1.2.0 patch ...
>  *   Applying sed/1.5.6 patch ...
>  *   Applying as-needed/2.4.3 patch ...
> >>> Source prepared.
> vm-gentoo-x64 /usr/portage/media-gfx/imagemagick # ls -al /var/tmp/portage/media-gfx/imagemagick-7.0.8.11/homedir/
> total 12
> drwxr-xr-x 3 portage portage 4096 Oct 28 17:45 .
> drwxr-xr-x 6 portage portage 4096 Oct 28 17:45 ..
> drwxr-xr-x 3 portage portage 4096 Oct 28 17:45 .config
> vm-gentoo-x64 /usr/portage/media-gfx/imagemagick # ebuild imagemagick-7.0.8.11.ebuild prepare
> >>> Existing ${T}/environment for 'imagemagick-7.0.8.11' will be sourced.
> >>> Run 'clean' to start with a fresh environment.
> >>> Checking ImageMagick-7.0.8-11.tar.xz's mtime...
> >>> WORKDIR is up-to-date, keeping...
> >>> It appears that 'pretend' has already executed for 'imagemagick-7.0.8.11'; skipping.
> >>> Remove '/var/tmp/portage/media-gfx/imagemagick-7.0.8.11/.pretended' to force pretend.
> >>> It appears that 'setup' has already executed for 'imagemagick-7.0.8.11'; skipping.
> >>> Remove '/var/tmp/portage/media-gfx/imagemagick-7.0.8.11/.setuped' to force setup.
> >>> It appears that 'unpack' has already executed for 'imagemagick-7.0.8.11'; skipping.
> >>> Remove '/var/tmp/portage/media-gfx/imagemagick-7.0.8.11/.unpacked' to force unpack.
> >>> It appears that 'prepare' has already executed for 'imagemagick-7.0.8.11'; skipping.
> >>> Remove '/var/tmp/portage/media-gfx/imagemagick-7.0.8.11/.prepared' to force prepare.
> vm-gentoo-x64 /usr/portage/media-gfx/imagemagick # ls -al /var/tmp/portage/media-gfx/imagemagick-7.0.8.11/homedir/
> total 8
> drwxr-xr-x 2 portage portage 4096 Oct 28 17:45 .
> drwxr-xr-x 6 portage portage 4096 Oct 28 17:45 ..

I'll move the creation of ${HOME}/.config/ImageMagick/policy.xml to src_test but I would expect that $HOME content would survive phases.
Comment 1 Larry the Git Cow gentoo-dev 2018-10-28 20:33:05 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c8f31d4867fd47cd057b515206562c9b6c2a9917

commit c8f31d4867fd47cd057b515206562c9b6c2a9917
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2018-10-28 20:23:51 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2018-10-28 20:32:54 +0000

    media-gfx/imagemagick: create files in $HOME for src_test in src_test
    
    Bug: https://bugs.gentoo.org/669878
    Package-Manager: Portage-2.3.51, Repoman-2.3.11
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 media-gfx/imagemagick/imagemagick-6.9.10.11.ebuild | 18 +++++++++++-------
 media-gfx/imagemagick/imagemagick-6.9.10.12.ebuild | 18 +++++++++++-------
 media-gfx/imagemagick/imagemagick-7.0.8.11.ebuild  | 20 ++++++++++++--------
 media-gfx/imagemagick/imagemagick-7.0.8.12.ebuild  | 18 +++++++++++-------
 media-gfx/imagemagick/imagemagick-9999.ebuild      | 20 ++++++++++++--------
 5 files changed, 57 insertions(+), 37 deletions(-)
Comment 2 Mike Gilbert gentoo-dev 2018-12-19 15:31:41 UTC
<floppym> in portage/package/ebuild/prepare_build_dirs.py, HOME is added to clean_dirs. T is also added to clean_dirs unless FEATURES="keeptemp" is set.

<floppym> portage removes any directory in clean_dirs.

<floppym> So, I think the solution to that bug is to move HOME behind keeptemp, or add a keephome feature.