Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 717886

Summary: app-emulation/virt-manager-2.2.1-r2 fails to build since recent distutils-r1.eclass change
Product: Gentoo Linux Reporter: Candy Gumdrop <candy>
Component: Current packagesAssignee: Virtualization Team <virtualization>
Status: RESOLVED FIXED    
Severity: normal CC: alexander, gentoo, gentoobugzilla, grknight, hubert.kromer, martin, vivo75
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=717502
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: app-emulation/virt-manager-2.2.1-r2 build.log
Use "esetup.py install" instead of "esetup.py --skip-build install"

Description Candy Gumdrop 2020-04-17 11:42:15 UTC
app-emulation/virt-manager-2.2.1-r2 fails to build with:

error: cannot copy tree '/var/tmp/portage_tmp/portage/app-emulation/virt-manager-2.2.1-r2/work/virt-manager-2.2.1_python3.6/scripts': not a directory

This seems to be due to the recent addition of --skip-build in distutils-r1.eclass

https://gitweb.gentoo.org/repo/gentoo.git/commit/eclass/distutils-r1.eclass?id=180fa85d7d00aea463c399f70348beaad9166eb7

Temporarily removing this flag from the eclass allows virt-manager to build without error.

Reproducible: Always

Steps to Reproduce:
1. Update to recent (2020-04-17) portage tree
2. emerge =app-emulation/virt-manager-2.2.1-r2
Actual Results:  
error: cannot copy tree '/var/tmp/portage_tmp/portage/app-emulation/virt-manager-2.2.1-r2/work/virt-manager-2.2.1_python3.6/scripts': not a directory

Expected Results:  
Build without error.

Portage 2.3.99 (python 3.6.10-final-0, default/linux/amd64/17.1, gcc-9.3.0, glibc-2.30-r8, 5.4.32-gentoo x86_64)
=================================================================
System uname: Linux-5.4.32-gentoo-x86_64-AMD_Ryzen_9_3900X_12-Core_Processor-with-gentoo-2.7
KiB Mem:    32793152 total,  20823880 free
KiB Swap:   33554428 total,  33554428 free
Timestamp of repository gentoo: Thu, 16 Apr 2020 23:38:18 +0000
Head commit of repository gentoo: 56993ebcea6509253f9dc7a86f1e5f5fd85acc1c

sh bash 5.0_p16
ld GNU ld (Gentoo 2.34 p1) 2.34.0
app-shells/bash:          5.0_p16::gentoo
dev-lang/perl:            5.30.2::gentoo
dev-lang/python:          2.7.17-r2::gentoo, 3.6.10-r1::gentoo, 3.7.7-r1::gentoo, 3.8.2-r1::gentoo
dev-util/cmake:           3.17.1::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.18::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.16.2::gentoo
sys-devel/binutils:       2.34::gentoo
sys-devel/gcc:            9.3.0::gentoo
sys-devel/gcc-config:     2.2.1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.6::gentoo (virtual/os-headers)
sys-libs/glibc:           2.30-r8::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    priority: -1000

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=native -pipe"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--jobs 3 --quiet-build"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -march=native -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -march=native -pipe"
GENTOO_MIRRORS="https://mirror.bytemark.co.uk/gentoo http://distfiles.gentoo.org"
LANG="en_GB.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j24"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
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="/var/tmp/portage_tmp"
USE="X acl amd64 berkdb bzip2 cli crypt dri fortran gdbm iconv ipv6 libtirpc multilib ncurses nls nptl openmp pam pcre pulseaudio readline seccomp split-usr ssl tcpd unicode xattr zlib zsh-completion" ABI_X86="64" ADA_TARGET="gnat_2018" 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 sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" L10N="en-GB" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="NVPTX WebAssembly AVR BPF" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" QEMU_SOFTMMU_TARGETS="x86_64 i386 arm aarch64 mips64el ppc ppc64" QEMU_USER_TARGETS="arm aarch64 mips64el ppc ppc64" RUBY_TARGETS="ruby27" USERLAND="GNU" VIDEO_CARDS="nvidia" 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_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Candy Gumdrop 2020-04-17 11:44:50 UTC
Created attachment 633378 [details]
app-emulation/virt-manager-2.2.1-r2 build.log
Comment 2 Bas Weelinck 2020-04-17 14:14:19 UTC
Can confirm this behaviour also occurs on my system. Reverting the eclass file fixes the problem.
Comment 3 Bas Weelinck 2020-04-17 14:47:29 UTC
I have just filed an additional bug for numpy that seems to have the same cause.

bug 717906
Comment 4 Bas Weelinck 2020-04-17 15:31:21 UTC
Thanks for your research btw, Candy Gumdrop, it helped that you had already figured out the eclass file change triggered this bug. (and gave me a workaround for now)
Comment 5 Martin McClure 2020-04-17 21:13:24 UTC
I'm also getting the same error.
+1 thanks to Candy Gumdrop for research.
Comment 6 Aisha Tammy 2020-04-18 15:35:16 UTC
Can confirm also having the same issue.
Comment 7 Aisha Tammy 2020-04-18 15:38:20 UTC
Also confirmed that removing --skip-build from distutils-r1.eclass fixes the bug and allows it to build :)

thanks @Candy Gumdrop
Comment 8 Brian Evans (RETIRED) gentoo-dev 2020-04-18 18:08:35 UTC
(In reply to Bas Weelinck from comment #2)
> Can confirm this behaviour also occurs on my system. Reverting the eclass
> file fixes the problem.

While it may revert to the old behavior, the package still needs to be updated to deal with it.  'esetup.py build' should happen at the right time and the log is showing is not currently.
Comment 9 rick 2020-04-18 19:57:37 UTC
Same problem and solution (remove --skip-build) here.
Comment 10 Brian Evans (RETIRED) gentoo-dev 2020-04-18 21:52:32 UTC
I believe the real solution is to change 

distutils-r1_python_compile to say python_configure.

Is there a good reason why an 'esetup.py configure' step is  in compile?

This looks to be preventing virt-manager from building properly.
Comment 11 Brian Evans (RETIRED) gentoo-dev 2020-04-18 21:53:14 UTC
diff --git a/app-emulation/virt-manager/virt-manager-2.2.1-r2.ebuild b/app-emulation/virt-manager/virt-manager-2.2.1-r2.ebuild
index ee09a0d573f..33a193d02c5 100644
--- a/app-emulation/virt-manager/virt-manager-2.2.1-r2.ebuild
+++ b/app-emulation/virt-manager/virt-manager-2.2.1-r2.ebuild
@@ -59,7 +59,7 @@ src_prepare() {
        distutils-r1_src_prepare
 }
 
-distutils-r1_python_compile() {
+python_configure() {
        local defgraphics=
 
        esetup.py configure \
Comment 12 Larry the Git Cow gentoo-dev 2020-04-18 22:06:41 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5ece5e2f1feb1b4ebafcb393af328662f0b9b051

commit 5ece5e2f1feb1b4ebafcb393af328662f0b9b051
Author:     Matthias Maier <tamiko@gentoo.org>
AuthorDate: 2020-04-18 21:54:52 +0000
Commit:     Matthias Maier <tamiko@gentoo.org>
CommitDate: 2020-04-18 22:05:43 +0000

    app-emulation/qemu: stabilize amd64 and x86 wrt bug #717886
    
    Bug: https://bugs.gentoo.org/717886
    Package-Manager: Portage-2.3.99, Repoman-2.3.22
    Signed-off-by: Matthias Maier <tamiko@gentoo.org>

 app-emulation/qemu/qemu-4.2.0-r5.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 13 Larry the Git Cow gentoo-dev 2020-04-19 00:32:16 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4358c8898d45e59fa3b16c72d67f4475d4851098

commit 4358c8898d45e59fa3b16c72d67f4475d4851098
Author:     Matthias Maier <tamiko@gentoo.org>
AuthorDate: 2020-04-19 00:31:41 +0000
Commit:     Matthias Maier <tamiko@gentoo.org>
CommitDate: 2020-04-19 00:31:41 +0000

    app-emulation/virt-manager: fix configuration craziness
    
    Closes: https://bugs.gentoo.org/717886
    Package-Manager: Portage-2.3.99, Repoman-2.3.22
    Signed-off-by: Matthias Maier <tamiko@gentoo.org>

 app-emulation/virt-manager/virt-manager-2.2.1-r2.ebuild | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
Comment 14 Larry the Git Cow gentoo-dev 2020-04-19 01:06:39 UTC
The bug has been referenced in the following commit(s):

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

commit c4503933639bc86fe77621a9166a8b3b446a4aeb
Author:     Brian Evans <grknight@gentoo.org>
AuthorDate: 2020-04-19 01:05:38 +0000
Commit:     Brian Evans <grknight@gentoo.org>
CommitDate: 2020-04-19 01:05:38 +0000

    app-emulation/virt-manager: Apply fix from bug 717886 to live ebuild
    
    Non-maintainer commit
    
    Bug: https://bugs.gentoo.org/717886
    Signed-off-by: Brian Evans <grknight@gentoo.org>

 app-emulation/virt-manager/virt-manager-9999.ebuild | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
Comment 15 Alexander Tsoy 2020-04-20 10:00:37 UTC
And now ebuild doesn't install desktop entry, icons, translations and bash-completions. :(
Comment 16 Alexander Tsoy 2020-04-20 10:42:52 UTC
(In reply to Alexander Tsoy from comment #15)
> And now ebuild doesn't install desktop entry, icons, translations and
> bash-completions. :(
Looks like data_files variable doesn't include these files if --skip-build is passed when installing.
Comment 17 Hubert Kromer 2020-04-24 01:05:28 UTC
Created attachment 634294 [details, diff]
Use "esetup.py install" instead of "esetup.py --skip-build install"

Change in distutils-r1.eclass causes potfiles (translations) and .desktop file to not install due to --skip-build for 'esetup.py install' being used by default.

Adding:

python_install() {
	esetup.py install
}

before pkg_preinst() fixed the issue for me.

Attaching "virt-manager-2.2.1-r2_po-desktop.patch".
Comment 18 Larry the Git Cow gentoo-dev 2020-04-24 18:48:18 UTC
The bug has been referenced in the following commit(s):

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

commit d4a208ec63b63b4d2960c7511965512a38fa84a8
Author:     Matthias Maier <tamiko@gentoo.org>
AuthorDate: 2020-04-24 17:44:41 +0000
Commit:     Matthias Maier <tamiko@gentoo.org>
CommitDate: 2020-04-24 18:47:49 +0000

    app-emulation/virt-manager: fix installation files
    
    Bug: https://bugs.gentoo.org/717886
    Closes: https://bugs.gentoo.org/718670
    Package-Manager: Portage-2.3.99, Repoman-2.3.22
    Signed-off-by: Matthias Maier <tamiko@gentoo.org>

 .../{virt-manager-2.2.1-r2.ebuild => virt-manager-2.2.1-r3.ebuild}    | 4 ++++
 app-emulation/virt-manager/virt-manager-9999.ebuild                   | 4 ++++
 2 files changed, 8 insertions(+)