Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 431052 - <=app-portage/euses-2.5.8 with >=sys-apps/portage-2.1.11.10 - euses fails with "PORTDIR not found"
Summary: <=app-portage/euses-2.5.8 with >=sys-apps/portage-2.1.11.10 - euses fails wit...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Jeroen Roovers (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 434778
  Show dependency tree
 
Reported: 2012-08-12 08:42 UTC by Klaus Kusche
Modified: 2012-09-12 02:13 UTC (History)
2 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 Klaus Kusche 2012-08-12 08:42:33 UTC
Since I emerged sys-apps/portage-2.1.11.10,
all invocations of euses fail with "PORTDIR not found".

Invocing euses with "PORTDIR=... euses ..." works.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2012-08-12 14:26:09 UTC
Which version of euses?
Comment 2 Klaus Kusche 2012-08-12 14:28:47 UTC
2.5.8
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2012-08-12 14:34:14 UTC
Please post your `emerge --info' output in a comment.
Comment 4 Klaus Kusche 2012-08-12 14:42:01 UTC
Portage 2.1.11.10 (default/linux/amd64/10.0/no-multilib, gcc-4.6.3, glibc-2.15-r2, 3.5.1-hardened x86_64)
=================================================================
System uname: Linux-3.5.1-hardened-x86_64-Intel-R-_Core-TM-_i7_CPU_Q_820_@_1.73GHz-with-gentoo-2.1
Timestamp of tree: Sun, 12 Aug 2012 07:45:01 +0000
app-shells/bash:          4.2_p37
dev-java/java-config:     2.1.12
dev-lang/python:          2.7.3-r2
dev-util/cmake:           2.8.8-r3
dev-util/pkgconfig:       0.27
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.10.5
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.12.2
sys-devel/binutils:       2.22.90
sys-devel/gcc:            4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.5 (virtual/os-headers)
sys-libs/glibc:           2.15-r2
Repositories: gentoo xfce-dev
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA dlj-1.1 AdobeFlash-10.3 Oracle-BCLA-JavaSE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -mtune=native -O2 -finline-functions -fomit-frame-pointer -fweb -maccumulate-outgoing-args -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -mtune=native -O2 -finline-functions -fomit-frame-pointer -fweb -maccumulate-outgoing-args -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build=n --with-bdeps=y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles keeptemp keepwork news noclean parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://de-mirror.org/distro/gentoo http://gentoo.inode.at http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror http://ftp.spline.inf.fu-berlin.de/mirrors/gentoo http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="en_DE.iso885915"
LC_ALL="en_DE.iso885915"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/portage"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/xfce-dev"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="64bit X a52 aac alsa amd64 apng applet archive ass bogofilter bzip2 cairo cdda cdparanoia cli contrast cups curl cxx dbus dconf demosaic detex devfs-compat dga divx dot dri dts dvd dvdnav dvdr dvi dvipdfm encode epspdf exif expat extra faad ffmpeg flac fontconfig foomaticdb fts3 g3dvl gallium gbm gif gimp glib glibc-omitfp gmp graphics gs gstreamer gtk gudev htmlreport iconv imagemagick inotify jbig jpeg jpeg2k kpathsea lasi latex latex3 lcdfilter lcms lensfun libkms libnotify libsamplerate libwww lightning llvm-gcc lua lzma lzo mad metric midi mmap mmx mmxext mng modules mp3 mta mudflap natspec ncat ncurses ndiff nntp nping nptl nsplugin ogg oldnet openmp openvg pam pango pax_kernel pcre pdf pic plugins png postproc postscript ppds pppd pstricks pth quicktime r600-llvm-compiler rar raw readline realmedia rle rpc rtc rule_generator sasl scanner schroedinger secure-delete session smp sndfile sound sqlite sqlite3 sse sse2 sse3 sse4_1 sse4_2 ssh ssl ssse3 svg symlink system-sqlite t1lib theora threads thunar tiff tremor truetype udev unlock-notify usb utils vaapi vim-with-x vnc vorbis vpx webp wmf wmp x264 xa xcb xcomposite xmp xorg xpm xrandr xulrunner xv xvid xvmc zip zlib" 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" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" 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 ubx" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby19" SANE_BACKENDS="epson" USERLAND="GNU" VIDEO_CARDS="radeon r600" 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, INSTALL_MASK, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 5 Klaus Kusche 2012-08-12 14:43:49 UTC
The change causing the trouble was portage, not euses.
The same euses version worked with the previous portage version
(that's why I've put portage first in the summary).
Comment 6 Jeroen Roovers (RETIRED) gentoo-dev 2012-08-12 15:00:23 UTC
(In reply to comment #5)
> The change causing the trouble was portage, not euses.
> The same euses version worked with the previous portage version
> (that's why I've put portage first in the summary).

euses doesn't use anything sys-apps/portage installs, but it does expect this shell script to succeed:

( for file in make.globals make.conf portage/make.conf; do
  [ -f /etc/$file ] && . /etc/$file
done;printf "%s" "${PORTDIR}"; )

Please run that and paste the output in a comment.
Comment 7 Klaus Kusche 2012-08-12 15:21:23 UTC
The statement does not produce any output.

Problem found, it *is* the fault of portage:

* Both make.conf files do not contain any PORTDIR, at least in my installation.

* /etc/make.globals was a symlink created and owned by portage
  to /usr/share/portage/config/make.globals, and this file defined PORTDIR.

* The /etc/make.globals symlink was removed from portage 2.1.11.9 to .10 .
Comment 8 Jeroen Roovers (RETIRED) gentoo-dev 2012-08-12 15:44:25 UTC
It's not anybody's fault if the removal from make.globals/make.conf is by design, and if tools are now expected to resolve this by setting their own defaults.
Comment 9 Klaus Kusche 2012-08-12 15:51:13 UTC
I think the portage team should provide a single, stable and well-documented way
for all the tools to access portage variables and settings, 
and the tools should use that interface (and not some home-grown method)
to access these values.
Comment 10 Jeroen Roovers (RETIRED) gentoo-dev 2012-08-12 16:28:12 UTC
There is such an interface: "portageq portdir" (short for "portageq envvar PORTDIR"), but since that takes half a second to return on my *fastest* system, and since euses is supposed to be faster than that, I have never seen any use for the canonical way of doing things unless it would become significantly faster.
Comment 11 Klaus Kusche 2012-08-12 17:08:44 UTC
time portageq portdir
/usr/portage

real	0m0.287s
user	0m0.270s
sys	0m0.010s

Very fast notebook with SSD, second attempt (first one was even slower).

Not too impressive.

Perhaps a performance bug against portageq should be opened?

PORTDIR ist simple and used often, there should be a faster "official" method
to get it.
Comment 12 Zac Medico gentoo-dev 2012-08-12 17:46:17 UTC
(In reply to comment #11)
> Perhaps a performance bug against portageq should be opened?
> 
> PORTDIR ist simple and used often, there should be a faster "official" method
> to get it.

It's "slow" because all the variables are accessed by the config object which parses the entire profile when it is instantiated. It could be optimized by categorizing the variables into profile-dependent and profile-independent sets, and allowing the profile-independent variables to be accessed without loading the profile.

Bug #418475, comment #6 explains some interactions between some special variables and the profile. Most variables can be set in the profile, by PORTDIR and PORTDIR_OVERLAY specifically cannot, since bug #414961.
Comment 13 Jeroen Roovers (RETIRED) gentoo-dev 2012-08-12 22:07:49 UTC
I don't think portageq performance will ever be as fast or even get close to simply parsing the correct files (or assume a default when unset).

Just keeping up with the files du jour would be enough for me, so now I just need to come up with a way to fix the euses build system to patch ${prefix}/${datarootdir}/${PN}/config/make.globals into the shell script in the C source code.
Comment 14 Jeroen Roovers (RETIRED) gentoo-dev 2012-08-13 15:12:41 UTC
Please try euses 2.5.9 and see if it fixes your problem.
Comment 15 Klaus Kusche 2012-08-14 08:28:56 UTC
2.5.9 works for me.

Thanks!
Comment 16 Jeroen Roovers (RETIRED) gentoo-dev 2012-08-14 12:46:35 UTC
Is there a tracker bug for >sys-apps/portage-2.1.11.10 so we know when to go stable?
Comment 17 Zac Medico gentoo-dev 2012-08-14 20:02:02 UTC
Bug #431026 is the tracker.

Current stable versions of portage also install /usr/share/portage/config/make.globals, so you can stabilize the new euses earlier if you want.