Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 508952 - app-portage/eix - eix-update does not receive env from make.conf
Summary: app-portage/eix - eix-update does not receive env from make.conf
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Third-Party Tools (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Martin Väth
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-28 10:07 UTC by Vladimir Varlamov
Modified: 2014-04-28 19:58 UTC (History)
3 users (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 Vladimir Varlamov 2014-04-28 10:07:54 UTC
eix-update does not receive env PORTDIR and etc. from make.conf and steel and still uses the default settings

Reproducible: Always

Steps to Reproduce:
1. change PORTDIR in make.conf (no mater in /etc/ or /etc/portage)
2. run eix-update

Actual Results:  
Reading Portage settings ..
Building database (/var/cache/eix/portage.eix) ..
Can't open /usr/portage/profiles/categories: No such file or directory


Expected Results:  
# PORTDIR=/var/portage eix-update
Reading Portage settings ..
Building database (/var/cache/eix/portage.eix) ..
[0] "gentoo" /var/portage/ (cache: metadata-md5-or-flat)
     Reading category 161|161 (100%) Finished             
[1] "" /usr/portage (cache: parse|ebuild*#metadata-md5#metadata-assign#assign)
     Reading category 161|161 (100%) EMPTY!
Applying masks ..
Calculating hash tables ..
Writing database file /var/cache/eix/portage.eix ..
Database contains 17379 packages in 161 categories.


# emerge --info |grep DIR
DISTDIR="/var/distfiles/"
PKGDIR="/var/distfiles/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/var/portage"
PORTDIR_OVERLAY="/usr/local/portage"

# emerge --info eix
Portage 2.2.8-r1 (default/linux/amd64/13.0/desktop/kde, gcc-4.8.2, glibc-2.17, 3.12.6 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.12.6-x86_64-Intel-R-_Core-TM-_i3-2120_CPU_@_3.30GHz-with-gentoo-2.2
KiB Mem:     8158592 total,   3587884 free
KiB Swap:          0 total,         0 free
Timestamp of tree: Mon, 28 Apr 2014 08:30:01 +0000
ld GNU ld (GNU Binutils) 2.23.2
app-shells/bash:          4.2_p45
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.5-r3, 3.2.5-r3, 3.3.3
dev-util/cmake:           2.8.12.2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.6, 1.13.4
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.8.2
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo local-bes-internal
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/fax /usr/libexec/munin/plugins /usr/share/bash-completion /usr/share/config /usr/share/gnupg/qualified.txt /var/spool/fax/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=native -pipe -fomit-frame-pointer"
DISTDIR="/var/distfiles/"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.yandex.ru/gentoo-distfiles/ http://distfiles.gentoo.org dev.gentooexperimental.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/var/distfiles/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/var/portage"
PORTDIR_OVERLAY="/usr/local/portage"
USE="64bit 7zip X a52 aac acpi aften alsa amd64 amr ass bash-completion berkdb bl bluetooth branding bzip2 cairo cdda cdr charconv cli consolekit corefonts cracklib crypt css cuda curl cxx dbus declarative dirac djvu dri dts dv dvb dvd dvdnav dvdr dvdread dynamic emboss enca encode exif fam fbcon fftw firefox flac fontconfig fortran ftp g3dvl gdbm gif glibc-omitfp gmp gpm graphite gstreamer gtk hal handbook iconv id3 ipv6 ithreads jpeg justify kde kipi ladspa lame lastfm lcms ldap libcaca libffi libkms libnotify lm_sensors logrotate lzma mad mdnsresponder-compat mem-scramble mercurial mmap mmx mng modules mp2 mp3 mp4 mpeg multilib musepack mysql ncurses nptl nsplugin ntfs ofa ogg openal opengl openmp osdmenu pam pango pch pcre pdf perl phonon plasma pmu png policykit ppds projectm python3 qt3support qt4 quicktime rdesktop readline real reiserfs rtc samba sasl schroedinger sdl semantic-desktop session shm slang smp snmp spell sql sqlite srt sse sse2 sse3 sse4 ssl ssse3 startup-notification svg symlink tcpd theora threads tiff tordns tremor truetype udev udisks unicode upower urandom usb v4l2 vdpau vnc vorbis wavpack webkit webp win32codecs win64codecs x264 xa xanim xcb xcomposite xft xinerama xml xnest xv xvfb xvid xvmc zeroconf zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="*" APACHE2_MPMS="worker" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_US" NGINX_MODULES_HTTP="image_filter" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" USERLAND="GNU" VIDEO_CARDS="nouveau vesa fbdev dummy" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

app-portage/eix-0.30.1 was built with the following:
USE="dep sqlite tools -debug -doc -nls -optimization -security -strong-optimization -strong-security -swap-remote" LINGUAS="-de -ru"
Comment 1 Martin Väth 2014-04-28 17:07:07 UTC
I cannot reproduce this here:

# PORTDIR=/nonexistent eix-update
Reading Portage settings ..
Building database (/var/cache/eix/portage.eix) ..
Can't open /nonexistent/profiles/categories: No such file or directory

# echo "PORTDIR=/notexistent" >/etc/portage/make.conf/99-test.conf
# eix-update
Reading Portage settings ..
Building database (/var/cache/eix/portage.eix) ..
Can't open /notexistent/profiles/categories: No such file or directory

(you can check more conveniently with eix-update --print PORTDIR which portdir eix-update actually chooses.)

Maybe you have overriden something in /etc/eixrc or ~/.eixrc?
Do you have some /etc/portage/repos.conf?
Comment 2 Vladimir Varlamov 2014-04-28 18:58:02 UTC
Oh yes, reproduce only on this mashine.

# cat /etc/eix*
cat: /etc/eixrc: Is a directory
# cat /etc/eixrc/*
cat: /etc/eixrc/*: No such file or directory

# PORTDIR=/nonexistent eix-update
Reading Portage settings ..
Building database (/var/cache/eix/portage.eix) ..
Can't open /nonexistent/profiles/categories: No such file or directory

# env-update
>>> Regenerating /etc/ld.so.cache...
# source /etc/profile

# env |grep DIR
MULTIOSDIRS=../lib64:../lib32
XDG_CONFIG_DIRS=/etc/xdg
XDG_DATA_DIRS=/usr/local/share:/usr/share

# cat /etc/portage/repos.conf/1
[DEFAULT]
main-repo = gentoo

[gentoo]
location = /var/portage
sync-type = rsync
sync-uri = rsync://rsync.gentoo.org/gentoo-portage

(also tried to remove all from /etc/portage/repos.conf/ with env-update )

# eix-update --print PORTDIR
/usr/portage/

# sudo -u anotheruser eix-update
Reading Portage settings ..
Building database (/var/cache/eix/portage.eix) ..
[0] "gentoo" /var/portage/ (cache: metadata-md5-or-flat)
     Reading category 162|162 (100%) Finished
[1] "" /usr/portage (cache: parse|ebuild*#metadata-md5#metadata-assign#assign)
     Reading category 162|162 (100%) EMPTY!
Applying masks ..
Calculating hash tables ..
Writing database file /var/cache/eix/portage.eix ..
Database contains 17387 packages in 162 categories.

(sic!)

Where else to look?
Comment 3 Martin Väth 2014-04-28 19:35:09 UTC
> [1] "" /usr/portage (cache: parse|ebuild*#metadata-md5#metadata-assign#assign)

This is very mysterious to me: Obviously, eix thinks that /usr/portage should be in your PORTDIR_OVERLAY path. The only case where eix has the path /usr/portage "hardcoded" is for PORTDIR (as a final fallback if it was impossible to find a value in any configuration) but not for PORTDIR_OVERLAY.

Concerning your original problem: If you get different behaviour for another user than for root, then probably some of your files /etc/portage/** or some of their parent directories do not have world-wide permissions for reading or executing, respectively: Note that, by default, eix-update drops its permissions to "portage:portage" before make.conf is read (if eix-update is called as root user): Try
# /bin/su -s/bin/sh portage
$ cat /etc/portage/make.conf # (or whatever is your path)
$ cat /etc/portage/repos.conf/1
Comment 4 Vladimir Varlamov 2014-04-28 19:58:39 UTC
Thanks, yes, it was wrong permissions on /etc/portage dir (1770). I looked at the file permissions and completely forgot about the directory.