Summary: | [RAP] app-portage/layman: config of repos_conf respect Prefix by default | ||
---|---|---|---|
Product: | Gentoo/Alt | Reporter: | Martin Mokrejš <mmokrejs> |
Component: | Prefix Support | Assignee: | Layman Overlay Manager project <layman> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | frp.bissey, prefix |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 315803 | ||
Attachments: | layman-cfg.patch |
Description
Martin Mokrejš
2016-06-29 07:18:34 UTC
(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. |