app-portage/epm does not follow ROOT and PORTAGE_CONFIGROOT environment variables. I have image of new system is /image and its portage config at /image-portage So I use something like: # ROOT=/image PORTAGE_CONFIGROOT=/image-portage emerge ... But epm does not follow these variables: # epm -qa shows packages from main install # ROOT=/image epm -qa show the same # ROOT=/image PORTAGE_CONFIGROOT=/image-portage epm -qa again the same The same issue about eix Other tools like equery.etc-update, etc work fine epm-1.33 eix-0.7.9
does portage-utils work correctly?
eix follows PORTAGE_CONFIG_ROOT since version 0.8.5. Since eix-0.8.7 there is support for EPREFIX which is probably rather the same than ROOT. If you want to use the name ROOT instead of EPREFIX, use the customization EPREFIX='%{ROOT}' I guess this should be the new default in eix-0.8.9. However, currently EPREFIX and PORTAGE_CONFIG_ROOT are combined simultaneously to find the real configpath which seems to differ from what portage does. I guess I should change this in eix-0.8.9, too, i.e. the configpath should be only ${PORTAGE_CONFIG_ROOT}; to avoid confusion with existing configurations, I will choose the default PORTAGE_CONFIG_ROOT='%{EPREFIX}' Is this OK, or is this in contradiction to current portage behavior?
(In reply to comment #2) > eix follows PORTAGE_CONFIG_ROOT since version 0.8.5. > Since eix-0.8.7 there is support for EPREFIX which is probably rather the same > than ROOT. If you want to use the name ROOT instead of EPREFIX, use the > customization > EPREFIX='%{ROOT}' The main difference between ROOT in portage and EPREFIX in eix is that EPREFIX is prepended to all pathes but ROOT prepended only to the install path. Here is an example: # ROOT=/tmp emerge -p eix These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild N ] app-portage/eix-0.7.9 to /tmp/ USE="-sqlite" Nothing was prepended to configpath and /tmp was used as install path. # EPREFIX=/tmp eix eix void CascadingProfile::ReadLink(std::string&) const: readlink(/tmp/etc/make.profile) failed: No such file or directory Does not work since EPREFIX was prepended to /etc/make.profile
(In reply to comment #3) > but ROOT prepended only to the install path. This is how I understood it originally. For this reason, I thought that ROOT support is useless for eix, because eix does not install anything... > Nothing was prepended to configpath [...] > Does not work since EPREFIX was prepended to /etc/make.profile As written in my previous posting, my plan for eix-0.8.9 is that EPREFIX applies no longer to PORTAGE_CONFIGROOT. However, EPREFIX will still apply for anything else like e.g. /var/{db,cache}/... In my understanding this should then completely correspond to portage's ROOT (if the user chooses the default PORTAGE_CONFIGROOT="") while the new default PORTAGE_CONFIGROOT=%{EPREFIX} will "emulate" the previous behavior of EPREFIX. I have checked in a version with this behavior in the current eix svn trunk. Please let me know if this is OK, then I release it...
According to Gentoo docs: EPREFIX is the filesystem location in which ALL packages will be installed to. That sounds exactly as ROOT, but lets follow the same file: # PORTAGE_TMPDIR is the location portage will use for compilations and # temporary storage of data. This can get VERY large depending upon # the application being installed. #PORTAGE_TMPDIR=${EPREFIX}/var/tmp # # PORTDIR is the location of the portage tree. This is the repository # for all profile information as well as all ebuilds. If you change # this, you must update your /etc/make.profile symlink accordingly. #PORTDIR=${EPREFIX}/usr/portage So EPREFIX is prepended to mostly everything (except the config dir) but ROOT is not prepended to PORTDIR, PORTAGE_TMPDIR, ... One more example: # PORTAGE_CONFIGROOT=./tmp emerge -p eix These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] app-portage/eix-0.7.9 to /tmp/ emerge shows that we have eix installed in /tmp/ So I expect eix will say the same when running with the same environment, but: # PORTAGE_CONFIGROOT=./tmp eix eix * app-portage/eix Available versions: 0.6.4 0.7.9 ~0.8.7 ~0.8.8 Homepage: http://eix.sourceforge.net Description: Small utility for searching ebuilds with indexing for fast results Looks like eix is not installed. I think the problem is that ROOT is defined in $PORTAGE_CONFIGROOT/etc/make.conf but eix does not get its value. So my idea is not to mix EPREFIX and ROOT eix does not install but ROOT is prepended to /var/db/pkg and eix uses this dir. More important support of ROOT and PORTAGE_CONFIGROOT in epm that completelly ignores it now. PS. It looks like emerge ignores EPREFIX
(In reply to comment #5) > So EPREFIX is prepended to mostly everything (except the config dir) > but ROOT is not prepended to PORTDIR, PORTAGE_TMPDIR, ... EPREFIX is not prepended to /usr/bin/update-eix-functions.sh ~/.eixrc cachefile path(s) passed in the commandline PORTAGE_CONFIGROOT (since 0.8.9) PORTAGE_PROFILE PORTDIR Overlay paths So far I see no difference to your ROOT description. > One more example: > # PORTAGE_CONFIGROOT=./tmp emerge -p eix [...] > [ebuild R ] app-portage/eix-0.7.9 to /tmp/ You have a strange portage: When I use PORTAGE_CONFIGROOT, my portage will not emerge to another root partition. I must set ROOT to achieve this. > Looks like eix is not installed. I think the problem is that ROOT is defined > in $PORTAGE_CONFIGROOT/etc/make.conf but eix does not get its value. If you want that EPREFIX or ROOT takes effect for eix, you must set it in the environment or in the eixrc config file: */etc/make.conf *never* overrides the settings of /etc/eixrc. If you really want that */etc/make.conf overrides the settings of /etc/eixrc, you can source this file from /etc/eixrc at the end. > So my idea is not to mix EPREFIX and ROOT An abstract idea does not help: It would be more useful to know for which paths EPREFIX/ROOT is in eix-0.8.9 falsely prepended in your opinion. > eix does not install but ROOT is prepended to /var/db/pkg and eix uses this > dir. Which corresponds to portage behavior: If ROOT is set, also portage prepends this path to /var/db/pkg and installs its data there. So it is just reasonable that eix will read the data from there. It still seems to me that eix-0.8.9 behaves as it should... > More important support of ROOT and PORTAGE_CONFIGROOT in epm that > completelly ignores it now. I am only the maintainer of eix, I cannot say anything about epm. > PS. It looks like emerge ignores EPREFIX You need the package prefix-portage from an overlay.
How can I get the latest sources of eix? The portage three contains 0.8.8 as latest.
Due to major changes in configuration, the next version will be eix-0.9.0. I decided now to let the user fine-tune for which paths which prefix is used: There is now a whole bunch of detailed EPREFIX* variables making use of delayed substitution. Thus, everybody can use prefix-portage or ROOT=... portage or some handcrafted chroot and change the config to his needs so that he just has to set *one* environment variable which applies to all desired delayed substitutions. (In reply to comment #7) > How can I get the latest sources of eix? This is documented on the eix homepage. Unfortunately this is down for quite a while now :( You need subversion (with -nowebdav) and then svn checkout http://gentooexperimental.org/svn/eix/trunk ./mktarball in trunk will build a tarball. I will wait some days for comments until I release the tarball. Please test.
I just have compiled eix-0.9.0 Cases when emerge and eix handle $ROOT prepends in different way: 1. $ROOT is not prepended to config dir in emerge but prepended in eix: # ROOT=/gentoo_uclibc/image/ ./eix void CascadingProfile::ReadLink(std::string&) const: readlink(/gentoo_uclibc/image//etc/make.profile) failed: No such file or directory # ROOT=/gentoo_uclibc/image/ emerge -p eix These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild N ] app-portage/eix-0.7.9 to /gentoo_uclibc/image/ USE="-sqlite" 2. $ROOT is not prepended to cache dir in emerge, but prepended in eix. /var/cache/eix and /var/cache/edb are not placed inside installed image. # PORTAGE_CONFIGROOT=/gentoo_uclibc/portage ROOT=/gentoo_uclibc/image/ ./eix eix Can't open the database file /gentoo_uclibc/image//var/cache/eix for reading (mode = 'rb') Did you forget to create it with 'update-eix'? # PORTAGE_CONFIGROOT=/gentoo_uclibc/portage ROOT=/gentoo_uclibc/image/ emerge -p eix These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild N ] app-portage/eix-0.7.9 to /gentoo_uclibc/image/ USE="-sqlite" ----- 3. Other case, $ROOT is not prepended to cache dir when used with $EPREFIX This confuses me: when $ROOT prepended and when not? # EPREFIX=/gentoo_uclibc/ ROOT=/image/ ./eix eix Can't open the database file /gentoo_uclibc//var/cache/eix for reading (mode = 'rb') Did you forget to create it with 'update-eix'? ----- Thank you.
(In reply to comment #9) > I just have compiled eix-0.9.0 Thanks for testing. There is now a new trunk (execute "svn update" in the trunk directory to get it), of course still called eix-0.9.0. > 1. $ROOT is not prepended to config dir in emerge but prepended in eix ...as is the case for EPREFIX: The idea was that ROOT and EPREFIX are equivalent unless you customize something. I made different defaults in the new version, now excluding config dir for ROOT but not for EPREFIX. > 2. $ROOT is not prepended to cache dir in emerge, but prepended in eix. > /var/cache/eix and /var/cache/edb are not placed inside installed image. This is one of the points why I decided that customization was necessary: One might discuss whether /var/cache/eix is "only" a cache or is more something like /var/db/pkg or perhaps more like /usr/portage or even like /etc/portage/package.* - now the user can decide. I changed now also the default for ROOT. > 3. This confuses me: when $ROOT prepended and when not? > # EPREFIX=/gentoo_uclibc/ ROOT=/image/ ./eix eix You should have read the new manpage. EPREFIX and ROOT were equivalent, so setting both was pointless (in the new version the defaults are different). You can see (and customize) in detail to which path which applies by considering eix --dump (or /etc/eixrc). The updated manpage is now more verbose about this and describes also the new defaults.
(In reply to comment #10) I got the last snapshot from svn. It works for me. Thank you.
I have committed the fixed version 0.9.1, thank you all!