Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 208021 - app-portage/eix-0.10.2 /usr/bin/update-eix-layman assumes layman repository inside PORTDIR
Summary: app-portage/eix-0.10.2 /usr/bin/update-eix-layman assumes layman repository i...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: Stefan Schweizer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-29 10:11 UTC by Lyall Pearce
Modified: 2008-07-04 21:32 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 Lyall Pearce 2008-01-29 10:11:31 UTC
Script /usr/bin/update-eix-layman assumes ${LOCAL_PORTDIR}/local/layman/make.conf

Line 63: Push LAYMAN_MAKE "${LOCAL_PORTDIR}/local/layman/make.conf"

I believe it should use PORTDIR_OVERLAY (if defined in /etc/make.conf) - which basically means that /usr/bin/update-eix-functions.sh would need to set a new variable, LOCAL_OVERLAY_DIR, for example.

LOCAL_PORTDIR_OVERLAY=''
GetPortOverlaydir () {
	test -n "${LOCAL_PORTDIR_OVERLAY}" && return
	LOCAL_PORTDIR_OVERLAY="$(update-eix --print PORTDIR_OVERLAY)"
}




Reproducible: Always

Steps to Reproduce:
. Establish layman repository outside of the default portage repository as defined in /etc/make.conf (PORTDIR)
. have /etc/make.conf "source {laymanRepositoryDir}/local/layman/make.conf"
. have /etc/make.conf PORTDIR_OVERLAY point to {laymanRepositoryDir}
. If you do not already have an overlay added, use 'layman' to add an overlay, eg. 'sunrise'
. perform 'update-eix-layman -a sunrise add'


Actual Results:  
. error message where script assumes location of overlay directory

Expected Results:  
expected script to find layman make.conf file in the layman repository (which is NOT within the usual PORTDIR tree)


I have my portage located in a filesystem called '/portage' as I do not like to update my core OS filesystems (/usr)
My gentoo portage directory is in '/portage/Repository' and I placed my Layman repository in '/portage/local'
My reasoning is if I have a failure whilst updating portage, I don't care if /portage does not come back on-line, I DO care if /usr does not come back on-line.

To overcome the problem, I simply moved my '/portage/local' directory into /portage/Repository' and then updated the configuration files /etc/make.conf and /portage/Repository/local/layman/make.conf and /etc/layman/layman.cfg


# emerge --info
Portage 2.1.3.19 (default-linux/x86/2007.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.23-gentoo-r6 i686)
=================================================================
System uname: 2.6.23-gentoo-r6 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz
Timestamp of tree: Tue, 29 Jan 2008 08:16:01 +0000
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.1.4
dev-lang/python:     2.4.4-r6
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.10-r5
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -mtune=pentium4 -march=pentium4 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -mtune=pentium4 -march=pentium4 -fomit-frame-pointer -pipe"
DISTDIR="/portage/Repository/distfiles"
FEATURES="autoconfig ccache collision-protect distlocks metadata-transfer nostrip parallel-fetch sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="ftp://mirror.internode.on.net/pub/gentoo ftp://mirror.pacific.net.au/linux/Gentoo http://mymirror.asiaosc.org/gentoo/ http://www.zentek-international.com/mirrors/gentoo/ http://open-systems.ufl.edu/mirrors/gentoo http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="en_AU"
MAKEOPTS="-j3"
PKGDIR="/portage/Repository/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/tmp"
PORTDIR="/portage/Repository"
PORTDIR_OVERLAY="/portage/Repository/local/layman/sunrise /portage/Repository/local"
SYNC="rsync://mirror.internode.on.net/gentoo-portage"
USE="X aac acl alsa apache2 berkdb bitmap-fonts cli cracklib crypt cups dri dvd dvdr flac fortran gdbm gnome gpm iconv ipv6 isdnlog java jpeg jpeg2k kde midi mikmod mp3 mplayer mudflap ncurses nls nptl nptlonly opengl openmp pam pcre perl pppd python readline real reflection session spl ssl tcpd threads tiff truetype-fonts type1-fonts unicode vorbis x86 xinerama xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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 mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nvidia vesa fbdev"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Martin Väth 2008-01-29 19:29:55 UTC
(In reply to comment #0)
> I believe it should use PORTDIR_OVERLAY (if defined in /etc/make.conf)

No, this is not a good idea: PORTDIR_OVERLAY is not reserved for layman overlays. Typically, it is also used for local patches or ebuilds.

In theory, update-eix-layman should have taken the value which the layman configuration defines for make_conf instead of
  ${LOCAL_PORTDIR}/local/layman/make.conf
Unfortunately, parsing the layman configuration is not a trivial task and, moreover, would have to rely much on layman's internals (the same is true if python is used to let the layman libraries do the parsing).
Having a separate configuration file for update-eix-layman is certainly overkill since most people have no use for it.

Therefore, the intended solution for a situation like yours is that you use a wrapper or an alias which calls
   update-eix-layman -CA /portage/local/layman/make.conf
instead of update-eix-layman.
Comment 2 Martin Väth 2008-07-04 21:32:27 UTC
*** Bug 230788 has been marked as a duplicate of this bug. ***