Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 649766 - app-portage/layman: duplicate path prefix when finding git binary for sync on Gentoo prefix
Summary: app-portage/layman: duplicate path prefix when finding git binary for sync on...
Status: UNCONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Layman Overlay Manager project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-06 18:02 UTC by Pengcheng Xu
Modified: 2021-01-10 19:23 UTC (History)
2 users (show)

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


Attachments
[patch] proposed patch for double EPREFIX in app-portage/layman-2.4.2-r2/layman/config.py (double-eprefix.patch,2.88 KB, patch)
2019-05-15 23:27 UTC, Radim Janalík
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pengcheng Xu 2018-03-06 18:02:45 UTC
When on Gentoo Prefix, portage will have trouble locating the git binary path for git repositories. Error output:

>>> Syncing repository 'vapoursynth' into '/home/jsteward/gentoo/var/lib/layman/vapoursynth'...
>>> Starting layman sync for vapoursynth...
* Program /home/jsteward/gentoo/home/jsteward/gentoo/usr/bin/git not found
* File /home/jsteward/gentoo/home/jsteward/gentoo/usr/bin/git seems to be missing! Overlay type git not supported. Did you emerge dev-vcs/git?
*
* Errors:
* ------
* Failed to sync overlay vapoursynth.
* Error was: Syncing overlay vapoursynth returned status 1!
* db.sync()
*

The git binary is located in /home/jsteward/gentoo/usr/bin/git , and EPREFIX is "/home/jsteward/gentoo". Obviously there's something wrong when handling the prefixes.

$ emerge --info
Portage 2.3.24 (python 3.5.4-final-0, default/linux/amd64/17.0/no-multilib/prefix/kernel-3.2+, gcc-7.3.0, glibc-2.26-r6, 4.13.0-36-generic x86_64)
=================================================================
System uname: Linux-4.13.0-36-generic-x86_64-Intel-R-_Xeon-R-_CPU_E5-2690_v4_@_2.60GHz-with-debian-stretch-sid
KiB Mem:   396153856 total, 345881980 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Mon, 05 Mar 2018 23:45:01 +0000
Head commit of repository gentoo: c388c5cfda54e787c30113aa438d859ee97dd8ea
sh bash 4.4_p19
ld GNU ld (Gentoo 2.30 p1) 2.30.0
app-shells/bash:          4.4_p19::gentoo
dev-lang/perl:            5.26.1-r2::gentoo
dev-lang/python:          2.7.14-r1::gentoo, 3.5.4-r1::gentoo
dev-util/cmake:           3.10.2::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.69-r4::gentoo
sys-devel/automake:       1.16-r1::gentoo
sys-devel/binutils:       2.30::gentoo
sys-devel/gcc:            7.3.0::gentoo
sys-devel/gcc-config:     1.9.1::gentoo
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1-r2::gentoo
sys-kernel/linux-headers: 4.15::gentoo (virtual/os-headers)
sys-libs/glibc:           2.26-r6::gentoo
Repositories:

gentoo
    location: /home/jsteward/gentoo/usr/portage
    sync-type: rsync
    sync-uri: rsync://mirrors.tuna.tsinghua.edu.cn/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts: 
    sync-rsync-verify-metamanifest: yes

vapoursynth
    location: /home/jsteward/gentoo/var/lib/layman/vapoursynth
    sync-type: laymansync
    sync-uri: https://github.com/4re/vapoursynth-portage.git
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -Ofast -pipe -march=broadwell -fomit-frame-pointer"
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/revdep-rebuild /etc/sandbox.d /etc/terminfo /home/jsteward/gentoo/etc/gentoo-release"
CXXFLAGS="-O2 -pipe -Ofast -pipe -march=broadwell -fomit-frame-pointer"
DISTDIR="/home/jsteward/gentoo/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="-v"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles force-prefix merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sfperms strict unknown-features-warn unmerge-logs unmerge-orphans unprivileged"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="https://mirrors.tuna.tsinghua.edu.cn/gentoo"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j56"
PKGDIR="/home/jsteward/gentoo/usr/portage/packages"
PORTAGE_CONFIGROOT="/home/jsteward/gentoo/"
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="/home/jsteward/gentoo/var/tmp"
USE="acl amd64 berkdb bzip2 cli crypt cxx dri fortran gdbm iconv ipv6 modules ncurses nls nptl openmp pcre prefix readline seccomp 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" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput keyboard mouse" 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-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" RUBY_TARGETS="ruby22 ruby23" 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"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Benda Xu gentoo-dev 2018-03-08 02:21:59 UTC
Did you trigger this bug by `layman -a vapoursynth` or something else?
Comment 2 Pengcheng Xu 2018-03-08 02:24:36 UTC
Adding this overlay with layman (`layman -a vapoursynth`) didn't give out any errors (working git, no complains); syncing it with emerge did. I do have the `sync-plugin-portage` USE flag enabled on layman.
Comment 3 Fabian Groffen gentoo-dev 2018-03-13 09:10:51 UTC
hmmm, could this be a layman problem instead?  Portage sources seem fine on first check.
Comment 4 Fabian Groffen gentoo-dev 2018-03-13 09:26:13 UTC
This is a layman problem.  resolve_command already seems to get a double-prefixed command.
Comment 5 Radim Janalík 2019-05-15 23:27:41 UTC
Created attachment 576814 [details, diff]
[patch] proposed patch for double EPREFIX in app-portage/layman-2.4.2-r2/layman/config.py

The problem is how git_command is set in layman/config.py
self.root is concatenated with EPREFIX, but it already contains EPREFIX at this point, so as a result, EPREFIX is twice in the path.

This patch in etc/portage/patches/app-portage/layman-2.4.2-r2/ removes self.root from path.
It seems to me that there is the same problem with other paths. This patch hopefully fixes those too, but I tested only git.

As I am new to Gentoo, I am not sure this is the best way of fixing this bug. Maybe EPREFIX should be removed instead of self.root? Or EPREFIX should not be part of self.root at this point? I don't know.
Comment 6 Benda Xu gentoo-dev 2020-05-13 00:55:44 UTC
Hi, does this bug still hold?  I don't seem to reproduce it.
Comment 7 Fabian Groffen gentoo-dev 2021-01-10 19:23:39 UTC
I don't understand why this path works, it can only be when the root argument/self.root thing actually is eroot.  In that case eroot + eprefix indeed is double.

@layman: please evaluate the patch, and close this bug based on your observations