Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 323017 - kde-base/pykde4-4.4.4: Byte-compiled Python modules are needlessly generated by the build system
Summary: kde-base/pykde4-4.4.4: Byte-compiled Python modules are needlessly generated ...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: AMD64 Linux
: High trivial (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-07 03:09 UTC by Richard
Modified: 2010-07-26 01:17 UTC (History)
1 user (show)

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


Attachments
build.log from "ebuild $(equery which =pykde4-4.4.4) install" (build.log,243.21 KB, text/plain)
2010-06-07 03:30 UTC, Richard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard 2010-06-07 03:09:17 UTC
I suspect that pykde4's build system is adding false dependencies to pykde4. I also suspect that building it with -Wl,--as-needed in the LDFLAGS enables portage to automatically detect and correct this.

Reproducible: Always

Steps to Reproduce:
0. You might need -Wl,--as-needed in your LDFLAGS
1. emerge -1v =pyqt4-4.4.4
2. Look at the output from portage.
Actual Results:  
 * Messages for package kde-base/pykde4-4.4.4:

 * Deleting byte-compiled Python modules needlessly generated by build system:
 *  /var/tmp/portage/kde-base/pykde4-4.4.4/image/usr/lib64/python2.6/site-packages/PyQt4/uic/pykdeuic4.pyc
 *  /var/tmp/portage/kde-base/pykde4-4.4.4/image/usr/lib64/python2.6/site-packages/PyQt4/uic/widget-plugins/kde4.pyc
 *  /var/tmp/portage/kde-base/pykde4-4.4.4/image/usr/lib64/python2.6/site-packages/PyKDE4/pykdeconfig.pyc
 *  /var/tmp/portage/kde-base/pykde4-4.4.4/image/usr/lib64/python2.6/site-packages/PyKDE4/__init__.pyc

Expected Results:  
There should have been no messages about byte-compiled Python modules needlessly being generated by the build system.

# emerge --info
Portage 2.1.8.3 (default/linux/amd64/10.0/no-multilib, gcc-4.4.3, glibc-2.11.1-r0, 2.6.33.4 x86_64)
=================================================================
System uname: Linux-2.6.33.4-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q9550_@_2.83GHz-with-gentoo-2.0.1
Timestamp of tree: Mon, 07 Jun 2010 00:15:03 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.1_p7
dev-java/java-config: 2.1.11
dev-lang/python:     2.6.5-r2, 3.1.2-r3
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.1-r1
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.3-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.8
virtual/os-headers:  2.6.33
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O3 -pipe -march=core2 -msse4.1 -mcx16 -msahf --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=6144 -ftree-loop-linear -fgcse-sm -fgcse-las -ftree-loop-im -ftree-loop-ivcanon -fivopts -frename-registers -fweb"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CPPFLAGS="-O3 -pipe -march=core2 -msse4.1 -mcx16 -msahf --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=6144 -ftree-loop-linear -fgcse-sm -fgcse-las -ftree-loop-im -ftree-loop-ivcanon -fivopts -frename-registers -fweb"
CXXFLAGS="-O3 -pipe -march=core2 -msse4.1 -mcx16 -msahf --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=6144 -ftree-loop-linear -fgcse-sm -fgcse-las -ftree-loop-im -ftree-loop-ivcanon -fivopts -frename-registers -fweb"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests buildpkg ccache distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O3 -pipe -march=core2 -msse4.1 -mcx16 -msahf --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=6144 -ftree-loop-linear -fgcse-sm -fgcse-las -ftree-loop-im -ftree-loop-ivcanon -fivopts -frename-registers -fweb"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X alsa amd64 berkdb bzip2 cdr cli consolekit cracklib crypt cups cxx dbus dri dvd dvdr fftw fortran gd gdbm gif gnutls gpm hal iconv ipv6 java java6 jpeg kde midi mmx mng modules mudflap ncurses nls nptl nptlonly nsplugin ntpl opengl openmp pam pcre perl png pppd python qt3 qt3support qt4 readline reflection session spl sse sse2 sse3 ssl ssse3 svg sysfs tcpd tiff unicode xml xorg zlib" ALSA_CARDS="ens1371" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="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 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" ELIBC="glibc" INPUT_DEVICES="keyboard vmmouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="vmware" 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:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Michael Weber (RETIRED) gentoo-dev 2010-06-07 03:23:32 UTC
Hello Richard,

the byte compilation aka optimization should happen in pkg_postinst and should be disabled in src_* phases. typically by modding the build system.

Please attach the full full build.log and i'll assign it to the maintainer.


Thanks, Michael
Comment 2 Richard 2010-06-07 03:30:17 UTC
Created attachment 234357 [details]
build.log from "ebuild $(equery which =pykde4-4.4.4) install"

Thankyou for the quick response. Here is the build.log file.
Comment 3 Michael Weber (RETIRED) gentoo-dev 2010-06-07 08:01:45 UTC
(In reply to comment #2)
> build.log from "ebuild $(equery which =pykde4-4.4.4) install"
fyi: `FEATURE="keeptemp" emerge -av1 pykde4` 


Comment 4 Richard 2010-06-07 13:42:53 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > build.log from "ebuild $(equery which =pykde4-4.4.4) install"
> fyi: `FEATURE="keeptemp" emerge -av1 pykde4` 
> 

Thanks. I did not know that emerge could do that.
Comment 5 Maciej Mrozowski gentoo-dev 2010-07-26 01:17:37 UTC
Yes, python modules are byte-compiled by buildsystem.
No, they are not installed - they are explicitly removed, only to be byte-compiled later in pkg_postinst.

equery files pykde4 | grep '\.pyc'
(empty)

In other words - no such issue.