Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 654804 - dev-python/PyQt5-5.10.1 install fails with cp: cannot copy a directory into itself
Summary: dev-python/PyQt5-5.10.1 install fails with cp: cannot copy a directory into i...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-04 07:50 UTC by Sammy Pfeiffer
Modified: 2018-12-22 19:40 UTC (History)
2 users (show)

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


Attachments
build.log (build.log,819.65 KB, text/plain)
2018-05-04 07:54 UTC, Sammy Pfeiffer
Details
environment log (environment,101.74 KB, text/plain)
2018-05-04 07:56 UTC, Sammy Pfeiffer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sammy Pfeiffer 2018-05-04 07:50:19 UTC
When emerging on a Gentoo Prefix environment dev-python/PyQt5-5.10.1 the install step fails with:

cp: cannot copy a directory, '/tmp/gentoo/var/tmp/portage/dev-python/PyQt5-5.10.1/image/tmp/.', into itself, '/tmp/
gentoo/var/tmp/portage/dev-python/PyQt5-5.10.1/image/.'

(My EPREFIX is: /tmp/gentoo).




Reproducible: Always

Steps to Reproduce:
1. emerge dev-python/PyQt5 on Gentoo Prefix
2.
3.
Actual Results:  
Package fails to emerge on the install phase

Expected Results:  
the package emerges correctly
Comment 1 Sammy Pfeiffer 2018-05-04 07:52:07 UTC
emerge --info:


Portage 2.3.33 (python 2.7.14-final-0, default/linux/amd64/17.0/no-multilib/prefix/kernel-3.2+, gcc-7.3.0, glibc-2.
26-r6, 4.13.0-39-generic x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.13.0-39-generic-x86_64-Intel-R-_Xeon-R-_CPU_E5-1660_0_@_3.30GHz-with-debian-stretch-sid
KiB Mem:    16351588 total,   6273240 free
KiB Swap:   31250428 total,  31250428 free
Timestamp of repository gentoo: Thu, 03 May 2018 08:00:01 +0000
Head commit of repository gentoo: 773d6b6957a875e094b14a79c1624955ba5aab69
Head commit of repository ros-overlay: 5db61447badf67bc986bc402a3d6bd3e66ebdec5

sh bash 4.4_p19
ld GNU ld (Gentoo 2.30 p2) 2.30.0
app-shells/bash:          4.4_p19::gentoo
dev-lang/perl:            5.26.2::gentoo
dev-lang/python:          2.7.14-r2::gentoo, 3.5.5-r1::gentoo
dev-util/cmake:           3.11.1::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.1-r1::gentoo
sys-devel/binutils:       2.30-r2::gentoo
sys-devel/gcc:            7.3.0-r1::gentoo
sys-devel/gcc-config:     1.9.1::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r3::gentoo
sys-kernel/linux-headers: 4.16-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.26-r6::gentoo
Repositories:

gentoo
    location: /tmp/gentoo/usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts:
    sync-rsync-verify-max-age: 24

ros-overlay
    location: /tmp/gentoo/usr/local/portage
    sync-type: git
    sync-uri: https://github.com/ros/ros-overlay
    masters: gentoo


ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -O2 -pipe"
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/fonts/fonts.conf /etc/gconf /etc/sandbox.d /etc/terminfo /tmp/gentoo/etc/gentoo-release"
CXXFLAGS="-O2 -pipe -O2 -pipe"
DISTDIR="/tmp/gentoo/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--jobs 3 --load-average 10.0"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg 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="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j6"
PKGDIR="/tmp/gentoo/usr/portage/packages"
PORTAGE_CONFIGROOT="/tmp/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="/tmp/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="karbon plan sheets stage words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" 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="python2_7" 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, ENV_UNSET, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Sammy Pfeiffer 2018-05-04 07:52:49 UTC
$ emerge -pqv '=dev-python/PyQt5-5.10.1::gentoo'

[ebuild  N    ] dev-python/PyQt5-5.10.1  USE="-bluetooth -dbus -debug -declarative -designer -examples -gles2 -gui -help -location -multimedia -network -opengl -positioning -printsupport -sensors -serialport -sql -svg -testlib -webchannel -webengine -webkit -websockets -widgets -x11extras -xmlpatterns" PYTHON_TARGETS="python2_7 python3_5 -python3_4 -python3_6" 

 * IMPORTANT: 11 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.
Comment 3 Sammy Pfeiffer 2018-05-04 07:54:40 UTC
Created attachment 529708 [details]
build.log

Attaching build.log
Comment 4 Sammy Pfeiffer 2018-05-04 07:56:17 UTC
Created attachment 529710 [details]
environment log

Attaching environment log
Comment 5 Fabian Groffen gentoo-dev 2018-05-29 09:51:37 UTC
is /tmp/gentoo/var/tmp/portage/dev-python/PyQt5-5.10.1/image/tmp a symlink to /tmp or something?
Comment 6 Fabian Groffen gentoo-dev 2018-05-29 09:54:12 UTC
Also, if you change this line in the ebuild:

        local tmp_root=${D%/}/tmp

into something like this:

        local tmp_root=${D%/}/temp

does that make the problem go away?
Comment 7 Sammy Pfeiffer 2018-05-30 07:43:48 UTC
I'm currently not able to reproduce the bug cause another bug is hitting me first, the same than reported here:

https://bugs.funtoo.org/browse/FL-5066?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel

ERROR:root:Failed to copy file: _parsed_options=Namespace(group=-1, mode=420, owner=-1, preserve_timestamps=False)


By the way, you can reproduce my environment with a Docker image I have prepared:

docker pull awesomebytes/ros_prefix_kinetic_ros_extended_1

In it you'll need to do execute /tmp/gentoo/startprefix

To be in the prefixed environment (there is two errors from sourcing .bashrc which are normal). Then you can emerge anything. But the sip package (dependency of PyQt5 is hitting me with the same bug above for some reason). I don't know what is going on. Sorry about the noise.
Comment 8 Sammy Pfeiffer 2018-05-30 07:46:47 UTC
(In reply to Sammy Pfeiffer from comment #7)
> I'm currently not able to reproduce the bug cause another bug is hitting me
> first, the same than reported here:
> 
> https://bugs.funtoo.org/browse/FL-5066?page=com.atlassian.jira.plugin.system.
> issuetabpanels%3Aall-tabpanel
> 
> ERROR:root:Failed to copy file: _parsed_options=Namespace(group=-1,
> mode=420, owner=-1, preserve_timestamps=False)
> 
> 
> By the way, you can reproduce my environment with a Docker image I have
> prepared:
> 
> docker pull awesomebytes/ros_prefix_kinetic_ros_extended_1
> 
> In it you'll need to do execute /tmp/gentoo/startprefix
> 
> To be in the prefixed environment (there is two errors from sourcing .bashrc
> which are normal). Then you can emerge anything. But the sip package
> (dependency of PyQt5 is hitting me with the same bug above for some reason).
> I don't know what is going on. Sorry about the noise.

If you pull that Docker image, to run it: docker run -it awesomebytes/ros_prefix_kinetic_ros_extended_1
Comment 9 Sammy Pfeiffer 2018-12-12 06:21:29 UTC
(In reply to Fabian Groffen from comment #6)
> Also, if you change this line in the ebuild:
> 
>         local tmp_root=${D%/}/tmp
> 
> into something like this:
> 
>         local tmp_root=${D%/}/temp
> 
> does that make the problem go away?

I got to get stuck into this same bug. I tried your workaround and it worked. The compilation went thru.
Comment 10 Sammy Pfeiffer 2018-12-12 06:42:47 UTC
(In reply to Sammy Pfeiffer from comment #9)
> (In reply to Fabian Groffen from comment #6)
> > Also, if you change this line in the ebuild:
> > 
> >         local tmp_root=${D%/}/tmp
> > 
> > into something like this:
> > 
> >         local tmp_root=${D%/}/temp
> > 
> > does that make the problem go away?
> 
> I got to get stuck into this same bug. I tried your workaround and it
> worked. The compilation went thru.

I also just tried changing ${D%/} to ${ED%/} and also worked. Maybe that should be the patch to apply?

Also, is there any way to use a local ebuild instead of the main tree one? (something like /etc/portage/patches/FOO/BAR.patch which is very convenient).
Comment 11 Fabian Groffen gentoo-dev 2018-12-12 08:18:45 UTC
@qt: it seems in some scenarios there is a "tmp" dir in the installed layout, and that this causes at least for the system here a problem.  Would it be possible to rename the tmp_local dir to something more unique, or remove tmp from the tmp image?
Comment 12 Larry the Git Cow gentoo-dev 2018-12-22 19:40:06 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6812c957f01c2ebd972b3aa8315247d035afb1ec

commit 6812c957f01c2ebd972b3aa8315247d035afb1ec
Author:     Davide Pesavento <pesa@gentoo.org>
AuthorDate: 2018-12-22 19:39:21 +0000
Commit:     Davide Pesavento <pesa@gentoo.org>
CommitDate: 2018-12-22 19:39:54 +0000

    dev-python/PyQt5: use a more unique name for tmp_root
    
    Closes: https://bugs.gentoo.org/654804
    Package-Manager: Portage-2.3.52, Repoman-2.3.12
    Signed-off-by: Davide Pesavento <pesa@gentoo.org>

 dev-python/PyQt5/PyQt5-5.10.1-r1.ebuild | 4 ++--
 dev-python/PyQt5/PyQt5-5.11.3.ebuild    | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)