Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 533648 - --autounmask-write=y ignores PORTAGE_CONFIGROOT
Summary: --autounmask-write=y ignores PORTAGE_CONFIGROOT
Status: RESOLVED DUPLICATE of bug 261109
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Configuration (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-27 00:22 UTC by Marco Clocchiatti
Modified: 2014-12-29 02:28 UTC (History)
1 user (show)

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


Attachments
emerge info (emerge.info,4.39 KB, text/plain)
2014-12-27 00:25 UTC, Marco Clocchiatti
Details
output of strace, during emerge (strace.txt,17.99 KB, text/plain)
2014-12-27 00:28 UTC, Marco Clocchiatti
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marco Clocchiatti 2014-12-27 00:22:34 UTC
emerge seems do not use PORTAGE_CONFIGROOT variable to evaluate dependencies.

Reproducible: Always

Steps to Reproduce:
1. PORTAGE_CONFIGROOT=/mnt/chroot/udoo ROOT=/mnt/chroot/udoo SYSROOT=/mnt/chroot/udoo nohup emerge @system --autounmask-write y

Actual Results:  
s939 ~ # ls -l /etc/portage/package.keywords/ -lAt|grep cfg
-rw-r--r-- 1 root root  775 26 dic 21.52 ._cfg0000_zzz

the ouptut ._cfg* file is putted in /etc/portage, instead of ${PORTAGE_CONFIGROOT}/etc/portage
Comment 1 Marco Clocchiatti 2014-12-27 00:25:31 UTC
Created attachment 392476 [details]
emerge info
Comment 2 Marco Clocchiatti 2014-12-27 00:28:53 UTC
Created attachment 392478 [details]
output of strace, during emerge

doing:
PORTAGE_CONFIGROOT=/mnt/chroot/udoo ROOT=/mnt/chroot/udoo SYSROOT=/mnt/chroot/udoo nohup strace -f -eopen emerge @system --autounmask-write y |& grep  "\/etc\/portage" >strace.txt &

this shows that emerge looks at /etc/portage, instead of ${PORTAGE_CONFIGROOT}/etc/portage to evaluate dependencies.
Comment 3 Marco Clocchiatti 2014-12-27 18:54:10 UTC
Thank's for your attention.
I see you handle my bug as a autounmask issue.

Please check if the problem may it be more severe, and if it depends from a bad
behaviuour of emerge.
Indeed, the strace log I've attached show that emerge scans /etc/portage packages.use, /etc/portage/package.keywords and so on, looking for dependency settings. That's a severely wrong behaviuor, because the user needs to scan ${PORTAGE_CONFIGS}/etc/portage tree for own purposes. This may cause the complete impossibility, for the user, to obtain a coeherent system in crossdev ${ROOT}, and shows that a major emerge feature is broken.
Moreover, the bad autounmask behaviuor shows that emerge make write accesses on wrong places, creating a concrete danger for system integrity.

if all that wolud be true, we have a critical bug, which blocks development and/or testing work of Gentoo as a whole.

sorry, if this seems long too much. I'm not a developer and I don't know english very well. I hope this helps to avoid a possible understimate of my issue.
Comment 4 Zac Medico gentoo-dev 2014-12-29 02:24:44 UTC
(In reply to Marco Clocchiatti from comment #2)
> this shows that emerge looks at /etc/portage, instead of
> ${PORTAGE_CONFIGROOT}/etc/portage to evaluate dependencies.

It's designed to do that. Please see bug #261109, comment #4 for my explanation.

*** This bug has been marked as a duplicate of bug 261109 ***
Comment 5 Zac Medico gentoo-dev 2014-12-29 02:28:45 UTC
Note that you can use the --root-deps option to force all dependencies to be installed into $ROOT.

Also, note that I've opened bug #533884 for some buggy behavior involving --autounmask-write, PORTAGE_CONFIGROOT, and CONFIG_PROTECT.