I have a second prefix-ed instance, installed through bootstrap_rap.sh (so it has it's own glibc). It seems layman do not respect the Prefix path: $ layman -a science * Adding overlay... * Running Git... # ( cd /scratch/mmokrejs/gentoo_rap/var/lib/layman && /scratch/mmokrejs/gentoo_rap/usr/bin/git clone git://anongit.gentoo.org/proj/sci.git /scratch/mmokrejs/gentoo_rap/var/lib/layman/science ) Cloning into '/scratch/mmokrejs/gentoo_rap/var/lib/layman/science'... remote: Counting objects: 102863, done. remote: Compressing objects: 100% (47368/47368), done. remote: Total 102863 (delta 63870), reused 89612 (delta 54386) Receiving objects: 100% (102863/102863), 23.02 MiB | 8.89 MiB/s, done. Resolving deltas: 100% (63870/63870), done. Checking connectivity... done. Checking out files: 100% (3487/3487), done. * Running Git... # ( cd /scratch/mmokrejs/gentoo_rap/var/lib/layman/science && /scratch/mmokrejs/gentoo_rap/usr/bin/git config user.name "layman" ) * Running Git... # ( cd /scratch/mmokrejs/gentoo_rap/var/lib/layman/science && /scratch/mmokrejs/gentoo_rap/usr/bin/git config user.email "layman@localhost" ) * CLI: Errors occurred processing action add * Exception caught installing repository "science": * /etc/portage/repos.conf is not a directory when it should be. [mmokrejs@login2.anselm sci-biology]$ emerge -pv layman These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] app-portage/layman-2.4.1-r1::gentoo USE="git -bazaar -cvs -darcs -g-sorcery -gpg -mercurial -sqlite -squashfs -subversion -sync-plugin-portage {-test}" PYTHON_TARGETS="python2_7 -pypy -python3_3 -python3_4 -python3_5" 0 KiB Total: 1 package (1 reinstall), Size of downloads: 0 KiB * IMPORTANT: 11 news items need reading for repository 'gentoo'. * Use eselect news read to view new items. $ $ emerge --info Portage 2.3.0 (python 3.4.4-final-0, prefix/linux-standalone/amd64, gcc-5.4.0, unavailable, 2.6.32-573.12.1.el6.Bull.88.x86_64 x86_64) ================================================================= System uname: Linux-2.6.32-573.12.1.el6.Bull.88.x86_64-x86_64-Intel-R-_Xeon-R-_CPU_E5-2670_0_@_2.60GHz-with-redhat-6.4-Santiago KiB Mem: 131942764 total, 21179540 free KiB Swap: 65536128 total, 64525500 free Timestamp of repository gentoo: Sat, 25 Jun 2016 00:45:01 +0000 sh bash 4.3_p46 ld GNU ld (Gentoo 2.26) 2.26.20160125 app-shells/bash: 4.3_p46::gentoo dev-lang/perl: 5.24.0-r1::gentoo dev-lang/python: 2.7.11-r2::gentoo, 3.4.4::gentoo dev-util/pkgconfig: 0.29.1::gentoo sys-apps/baselayout: 2.2::rap sys-apps/sandbox: 2.10-r2::gentoo sys-devel/autoconf: 2.69-r2::gentoo sys-devel/automake: 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo sys-devel/binutils: 2.26::rap sys-devel/gcc: 5.4.0::gentoo sys-devel/gcc-config: 1.8_p20160608::rap sys-devel/libtool: 2.4.6-r2::gentoo sys-devel/make: 4.2.1::gentoo sys-kernel/linux-headers: 4.6::gentoo (virtual/os-headers) sys-libs/glibc: 2.23-r2::rap Repositories: gentoo location: /scratch/mmokrejs/gentoo_rap/usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 eclass-overrides: rap rap location: /scratch/mmokrejs/gentoo_rap/usr/portage-stage sync-type: git sync-uri: https://anongit.gentoo.org/git/proj/android.git masters: gentoo eclass-overrides: rap ACCEPT_KEYWORDS="amd64 ~amd64 ~amd64-linux" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -O2 -pipe -march=native" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -pipe -O2 -pipe -march=native" DISTDIR="/scratch/mmokrejs/gentoo_rap/usr/portage/distfiles" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles force-prefix merge-sync news parallel-fetch preserve-libs protect-owned sfperms strict unknown-features-warn unmerge-logs unmerge-orphans unprivileged userfetch userpriv usersync" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://gentoo.wheel.sk/ http://ftp.fi.muni.cz/pub/linux/gentoo/ http://gentoo.mirror.web4u.cz/ rsync://gentoo.mirror.dkm.cz/gentoo/ ftp://gentoo.mirror.web4u.cz/" LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j8" PKGDIR="/scratch/mmokrejs/gentoo_rap/usr/portage/packages" PORTAGE_CONFIGROOT="/scratch/mmokrejs/gentoo_rap/" 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 --exclude=/.git" PORTAGE_TMPDIR="/scratch/mmokrejs/gentoo_rap/var/tmp" USE="acl amd64 berkdb bzip2 cli cracklib crypt cxx dri fortran gdbm iconv ipv6 mmx mmxext modules ncurses nls nptl openmp pcre prefix readline seccomp session sse sse2 ssl tcpd unicode 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="authn_core authz_core socache_shmcb unixd 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 author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" 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="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l" 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" USE_PYTHON="2.7" Unset: CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS $
(In reply to Martin Mokrejš from comment #0) > I have a second prefix-ed instance, installed through bootstrap_rap.sh (so > it has it's own glibc). It seems layman do not respect the Prefix path: > > * CLI: Errors occurred processing action add > * Exception caught installing repository "science": > * /etc/portage/repos.conf is not a directory when it should be. Does converting EPREFIX/etc/portage/repos.conf into a directory solve this issue? $ cd EPREFIX/etc/portage/ $ mv repos.conf gentoo.conf $ mkdir repos.conf $ mv gentoo.conf repos.conf/
Probably EPREFIX/etc/layman/layman.cfg needs to be updated, too.
(In reply to Benda Xu from comment #1) > (In reply to Martin Mokrejš from comment #0) > > I have a second prefix-ed instance, installed through bootstrap_rap.sh (so > > it has it's own glibc). It seems layman do not respect the Prefix path: > > > > * CLI: Errors occurred processing action add > > * Exception caught installing repository "science": > > * /etc/portage/repos.conf is not a directory when it should be. > > Does converting EPREFIX/etc/portage/repos.conf into a directory solve this > issue? > > $ cd EPREFIX/etc/portage/ > $ mv repos.conf gentoo.conf > $ mkdir repos.conf > $ mv gentoo.conf repos.conf/ The above alone it is not enough.
(In reply to Benda Xu from comment #2) > Probably EPREFIX/etc/layman/layman.cfg needs to be updated, too. Do not know what to change in this file. Fo example 'layman -d haskell' also fails with the same error. It seems removing the stale XML entry from EPREFIX/var/lib/layman/installed.xml is enough? Well, maybe some more work is needed to manually finish the removal ... Does this help?
I cannot reproduce this bug. (In reply to Martin Mokrejš from comment #4) > (In reply to Benda Xu from comment #2) > > Probably EPREFIX/etc/layman/layman.cfg needs to be updated, too. > > Do not know what to change in this file. [MAIN] #----------------------------------------------------------- # Defines the directory where overlays should be installed storage : !!!Replace with EPREFIX!!!/var/lib/layman #----------------------------------------------------------- # Path to the repos.conf file that should be modified by # layman repos_conf : !!!Replace with EPREFIX!!!/etc/portage/repos.conf/layman.conf > Fo example 'layman -d haskell' also fails with the same error. Does it help if you synchronize rap, https://wiki.gentoo.org/wiki/Prefix/libc#Synchronize_with_the_RAP_repository and emerge bash again?
(In reply to Benda Xu from comment #5) > I cannot reproduce this bug. > > (In reply to Martin Mokrejš from comment #4) > > (In reply to Benda Xu from comment #2) > > > Probably EPREFIX/etc/layman/layman.cfg needs to be updated, too. > > > > Do not know what to change in this file. > > [MAIN] > #----------------------------------------------------------- > # Defines the directory where overlays should be installed > > storage : !!!Replace with EPREFIX!!!/var/lib/layman > > #----------------------------------------------------------- > # Path to the repos.conf file that should be modified by > # layman > > repos_conf : !!!Replace with EPREFIX!!!/etc/portage/repos.conf/layman.conf The first was already in there: storage : /scratch/mmokrejs/gentoo_rap/var/lib/layman but the second is wrong repos_conf : /etc/portage/repos.conf/layman.conf Why is the placeholder '!!!Replace with EPREFIX!!!' missing? > > > > For example 'layman -d haskell' also fails with the same error. > > Does it help if you synchronize rap, > > > https://wiki.gentoo.org/wiki/Prefix/libc#Synchronize_with_the_RAP_repository > > and emerge bash again? I re-emerged bash, and maybe because of the above manual edits to config files, it behaves better now: $ layman -d haskell * Deleting selected overlay(s)... * Deleting directory "/scratch/mmokrejs/gentoo_rap/var/lib/layman/haskell" * ReposConf: ConfigHandler.read(); Failed to read "/scratch/mmokrejs/gentoo_rap/etc/portage/repos.conf/layman.conf". * File not found. * Successfully deleted overlay(s) haskell. $
(In reply to Martin Mokrejš from comment #6) > (In reply to Benda Xu from comment #5) > > I cannot reproduce this bug. > > > > (In reply to Martin Mokrejš from comment #4) > > > (In reply to Benda Xu from comment #2) > > > > Probably EPREFIX/etc/layman/layman.cfg needs to be updated, too. > > > > > > Do not know what to change in this file. > > > > [MAIN] > > #----------------------------------------------------------- > > # Defines the directory where overlays should be installed > > > > storage : !!!Replace with EPREFIX!!!/var/lib/layman > > > > #----------------------------------------------------------- > > # Path to the repos.conf file that should be modified by > > # layman > > > > repos_conf : !!!Replace with EPREFIX!!!/etc/portage/repos.conf/layman.conf > > > The first was already in there: > > storage : /scratch/mmokrejs/gentoo_rap/var/lib/layman > > but the second is wrong > > repos_conf : /etc/portage/repos.conf/layman.conf > > > Why is the placeholder '!!!Replace with EPREFIX!!!' missing? I invented it, it doesn't exist. > > > For example 'layman -d haskell' also fails with the same error. > > > > Does it help if you synchronize rap, > > > > > > https://wiki.gentoo.org/wiki/Prefix/libc#Synchronize_with_the_RAP_repository > > > > and emerge bash again? > > > I re-emerged bash, and maybe because of the above manual edits to config > files, it behaves better now: > > $ layman -d haskell > > * Deleting selected overlay(s)... > * Deleting directory "/scratch/mmokrejs/gentoo_rap/var/lib/layman/haskell" > * ReposConf: ConfigHandler.read(); Failed to read > "/scratch/mmokrejs/gentoo_rap/etc/portage/repos.conf/layman.conf". Remove and add back overlays will solve that. > * File not found. > * Successfully deleted overlay(s) haskell.
You seem to be right, as always. ;-) $ layman -d haskell * Deleting selected overlay(s)... * Deleting directory "/scratch/mmokrejs/gentoo_rap/var/lib/layman/haskell" * Successfully deleted overlay(s) haskell. $ layman -a haskell * Adding overlay... * Running Git... # ( cd /scratch/mmokrejs/gentoo_rap/var/lib/layman && /scratch/mmokrejs/gentoo_rap/usr/bin/git clone git://github.com/gentoo-haskell/gentoo-haskell.git /scratch/mmokrejs/gentoo_rap/var/lib/layman/haskell ) Cloning into '/scratch/mmokrejs/gentoo_rap/var/lib/layman/haskell'... remote: Counting objects: 169429, done. remote: Compressing objects: 100% (115/115), done. remote: Total 169429 (delta 49), reused 0 (delta 0), pack-reused 169314 Receiving objects: 100% (169429/169429), 39.21 MiB | 10.42 MiB/s, done. Resolving deltas: 100% (91106/91106), done. Checking connectivity... done. Checking out files: 100% (5947/5947), done. * Running Git... # ( cd /scratch/mmokrejs/gentoo_rap/var/lib/layman/haskell && /scratch/mmokrejs/gentoo_rap/usr/bin/git config user.name "layman" ) * Running Git... # ( cd /scratch/mmokrejs/gentoo_rap/var/lib/layman/haskell && /scratch/mmokrejs/gentoo_rap/usr/bin/git config user.email "layman@localhost" ) !!! Repository 'x-layman' is missing masters attribute in '/scratch/mmokrejs/gentoo_rap/var/lib/layman/metadata/layout.conf' !!! Set 'masters = gentoo' in this file for future compatibility * Successfully added overlay(s) haskell. $ What what was the problem and what will be fixed in layman or its config files?
(In reply to Martin Mokrejš from comment #8) > !!! Repository 'x-layman' is missing masters attribute in > '/scratch/mmokrejs/gentoo_rap/var/lib/layman/metadata/layout.conf' > !!! Set 'masters = gentoo' in this file for future compatibility This is just a warning. Just does as it said: add masters = gentoo in /scratch/mmokrejs/gentoo_rap/var/lib/layman/metadata/layout.conf . If you don't you that overlay, just delete it (in EPREFIX/etc/portage/repos.conf/XXXXXX.conf). Reference: https://wiki.gentoo.org/wiki//etc/portage/repos.conf The problem was the config file had a wrong default location for repos.conf.
Created attachment 441336 [details, diff] layman-cfg.patch Hi, Layman Team. The default config of layman sets repos_conf : /etc/portage/repos.conf/layman.conf which does not work on Prefix by default. In the ebuild, there is eprefixify etc/layman.cfg. Therefore prefixing @GENTOO_PORTAGE_EPREFIX@ is enough. Please review.
Martin, I wish you remembered this bug. *** This bug has been marked as a duplicate of bug 604870 ***
*** Bug 604870 has been marked as a duplicate of this bug. ***
I voted for this bug. This is annoying.
Benda I think you should just push it for the moment to fix the issue.
Sorry about putting this off, I'm going through the bug now and should just be able to apply the patch and push out a rev.
Seems Benda already added the fix. The problem, however, is that layman should've allowed for this flexibility already: https://github.com/gentoo/layman/blob/master/layman/config.py#L45 Let's keep this open until I discuss why the behaviour failed to begin with.
patch applied and released in layman-2.4.2
Seems -2.4.2 works properly now (dropped all my overlays and re-added them back without need to add entries manually to /apps/gentoo/etc/portage/repos.conf/layman.conf). Thank you.