Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 604870 - app-portage/layman-2.4.1-r1 - respect EPREFIX
Summary: app-portage/layman-2.4.1-r1 - respect EPREFIX
Status: RESOLVED DUPLICATE of bug 587474
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Layman Overlay Manager project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-06 20:21 UTC by Martin Mokrejš
Modified: 2017-01-15 14:34 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
layman-prefix.patch (layman-prefix.patch,783 bytes, patch)
2017-01-15 14:29 UTC, Benda Xu
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Mokrejš 2017-01-06 20:21:12 UTC
Hi,
  I just installed via Gentoo::RAP this:

>>> Completed installing layman-2.4.1-r1 into /apps/gentoo/var/tmp/portage/app-portage/layman-2.4.1-r1/image/

 * Final size of build directory: 1632 KiB
 * Final size of installed tree: 2352 KiB

ecompressdir: bzip2 -9 /usr/share/doc
ecompressdir: bzip2 -9 /usr/share/man

>>> Installing (1 of 1) app-portage/layman-2.4.1-r1::gentoo
 * Running layman-updater...
 *   Creating layman's repos.conf file
 *   create_repos_conf() error creating /etc/portage/repos.conf: 
 *   "[Errno 2] No such file or directory: '/etc/portage/repos.conf'"
 *   You are now ready to add overlays into your system.
 *   
 *     layman -L
 *   
 *   will display a list of available overlays.
 *   
 *   Select an overlay and add it using
 *   
 *     layman -a overlay-name
 *   
 * 
>>> Recording app-portage/layman in "world" favorites file...




$  layman -a science

 * Adding overlay...
 * Warning: an installed db file was not found at: ['/apps/gentoo/var/lib/layman/cache_930c3ed4a5f89f74fd810585751a06e3.xml']
 * Exception: Overlay "science" does not exist.

 * CLI: Errors occurred processing action add
 * Exception: Overlay "science" does not exist.


My EPREFIX="/apps/gentoo".



I see, I have to edit my make.conf to provide some values like:

PORTDIR_OVERLAY="/apps/gentoo/var/lib/layman"
source /apps/gentoo/var/lib/layman/make.conf




Then I tried:

$ layman -L

 * Fetching remote list...
 * Warning: an installed db file was not found at: ['/apps/gentoo/var/lib/layman/cache_930c3ed4a5f89f74fd810585751a06e3.xml']
 * Fetch Ok

 * 0x4d4c                    [Git       ] (https://github.com/0x4d4c/gentoo-overlay.git, git://github.com/0x4d4c/gentoo-overlay.git, git@github.com:0x4d4c/gentoo-overlay.git                             
...
$  layman -a science

 * Adding overlay...
 * Running Git... # ( cd /apps/gentoo/var/lib/layman  && /apps/gentoo/usr/bin/git clone git://anongit.gentoo.org/proj/sci.git /apps/gentoo/var/lib/layman/science )
Cloning into '/apps/gentoo/var/lib/layman/science'...
remote: Counting objects: 105218, done.
remote: Compressing objects: 100% (43204/43204), done.
remote: Total 105218 (delta 65412), reused 100152 (delta 60900)
Receiving objects: 100% (105218/105218), 23.49 MiB | 8.90 MiB/s, done.
Resolving deltas: 100% (65412/65412), done.
 * Running Git... # ( cd /apps/gentoo/var/lib/layman/science  && /apps/gentoo/usr/bin/git config user.name "layman" )
 * Running Git... # ( cd /apps/gentoo/var/lib/layman/science  && /apps/gentoo/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.
$

So, somewhat I got through but the path is:

$ ls -latr /apps/gentoo/etc/portage/repos.conf 
-rw-r----- 1 mmokrejs mmokrejs 306 Jan  6 15:23 /apps/gentoo/etc/portage/repos.conf
$

$ cat /apps/gentoo/etc/portage/repos.conf
[DEFAULT]
main-repo = gentoo
eclass-overrides = rap

[gentoo]
location = /apps/gentoo/usr/portage
sync-type = rsync
sync-uri = rsync://rsync.gentoo.org/gentoo-portage

[rap]
location = /apps/gentoo/usr/portage-stage
sync-type = git
sync-uri = https://anongit.gentoo.org/git/proj/android.git
auto-sync = no
$


Looks layman needs a fix to respect EPREFIX somewhere.
Comment 1 Brian Dolbec (RETIRED) gentoo-dev 2017-01-11 17:33:55 UTC
Thanks for this report.  It does look like we broke EPREFIX support somewhere.

Also, side-note.  You should migrate to the repos.conf settings method for portage.  See layman-updater which can perform the migration for you.
Comment 2 Benda Xu gentoo-dev 2017-01-15 14:29:34 UTC
Created attachment 460138 [details, diff]
layman-prefix.patch

Hello, Brian.  The problem is in layman.cfg

#----------------------------------------------------------- 
# Path to the repos.conf file that should be modified by   
# layman

repos_conf : /etc/portage/repos.conf/layman.conf

This patch fixes it.
Comment 3 Benda Xu gentoo-dev 2017-01-15 14:31:57 UTC
*** Bug 587474 has been marked as a duplicate of this bug. ***
Comment 4 Benda Xu gentoo-dev 2017-01-15 14:34:39 UTC
Oops, an old bug had exactly the same patch.

*** This bug has been marked as a duplicate of bug 587474 ***