Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 382601 - app-portage/elogviewer-0.6.2-r1 does not work with python3.2
Summary: app-portage/elogviewer-0.6.2-r1 does not work with python3.2
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords: InVCS
: 383767 (view as bug list)
Depends on:
Blocks: 308257
  Show dependency tree
 
Reported: 2011-09-11 14:45 UTC by Kamen Dokov
Modified: 2011-09-24 22:42 UTC (History)
2 users (show)

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


Attachments
working python3.2 ebuild (elogviewer-0.6.2-r1.ebuild,1.58 KB, text/plain)
2011-09-11 21:25 UTC, Kamen Dokov
Details
diff (elogviewer-0.6.2-r1.diff,807 bytes, text/plain)
2011-09-11 21:25 UTC, Kamen Dokov
Details
bumped ebuild fixing the python dep and shebang (elogviewer-0.6.2-r2.ebuild,1.68 KB, text/plain)
2011-09-11 23:12 UTC, Brian Dolbec (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kamen Dokov 2011-09-11 14:45:25 UTC
app-portage/elogviewer-0.6.2-r1 + eselect python set python3.2 exits with :


elogviewer
  File "/usr/bin/elogviewer", line 60
    print "a recent version of pygtk is required"
                                                ^
SyntaxError: invalid syntax


Reproducible: Always

Steps to Reproduce:
1.eselect python set python3.2
2.start elogviewer
3.
Actual Results:  
elogviewer
  File "/usr/bin/elogviewer", line 60
    print "a recent version of pygtk is required"
                                                ^
SyntaxError: invalid syntax


Expected Results:  
to run fine with gtk frontend

emerge --info '=app-portage/elogviewer-0.6.2-r1'
Portage 2.2.0_alpha39_p20 (default/linux/amd64/10.0/desktop, gcc-4.5.3, glibc-2.13-r4, 2.6.39.1-zen-00003-g6d6d304 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-2.6.39.1-zen-00003-g6d6d304-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_6000+-with-gentoo-2.0.3
Timestamp of tree: Sun, 11 Sep 2011 08:00:01 +0000
ccache version 3.1.6 [enabled]
app-shells/bash:          4.2_p10
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r2, 3.2-r2
dev-util/ccache:          3.1.6
dev-util/cmake:           2.8.5-r2
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.9.3-r1
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.1-r1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r1
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 2.6.39 (virtual/os-headers)
sys-libs/glibc:           2.13-r4
Repositories: gentoo repo_name-seti
Installed sets: @kde, @koffice
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64-sse3 -O2 -pipe -fomit-frame-pointer -ftree-vectorize -ftree-loop-linear"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/env.d /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /usr/share/config/kdm/ /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0 /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"
CXXFLAGS="-march=athlon64-sse3 -O2 -pipe -fomit-frame-pointer -ftree-vectorize -ftree-loop-linear -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs candy ccache distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://gentoo.osuosl.org http://mirrors.ludost.net/gentoo/ ftp://mirrors.ludost.net/gentoo/ http://gentoo.osuosl.org http://mirror.gentoo.no/ http://gentoo.ynet.sk/pub http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="bg_BG.UTF-8"
LC_ALL="bg_BG.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--enable-new-dtags"
LINGUAS="en"
MAKEOPTS="-j4"
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.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X acl acpi alsa amd64 bash-completion bitmap-fonts bluray branding cairo cdr cli consolekit cracklib crypt cups dbus dri dvd dvdr dvdread encode esd evo exceptions fam fortran gcj gdbm gif gles gpm handbook html iconv ipv6 isdnlog jpeg kde4 ldap mad midi mikmod mmx mmxext mp3 mpeg mudflap multilib ncurses nls nptl nptlonly nsplugin ocamlopt ogg opengl openmp oss pam pcre pdf png policykit pppd pulseaudio python qt3support qt4 quicktime readline reflection sdl session spell spl sqlite sse sse2 sse3 ssl ssse3 svg tcpd threads tiff truetype truetype-fonts type1-fonts udev udisks unicode upower vorbis xcomposite xml xorg xv zeroconf zlib" ALSA_CARDS="hda-nvidia hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias asis auth_basic auth_digest authn_alias authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cern_meta charset_lite dav dav_fs dav_lock dbd deflate dir disk_cache dumpio env expires ext_filter file_cache filter headers ident imagemap include info log_config log_forensic logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_ftp proxy_http rewrite setenvif speling status substitute unique_id userdir usertrack version vhost_alias cgid cgi" APACHE2_MPMS="worker" CAMERAS="ptp2 canon" ELIBC="glibc" GPSD_PROTOCOLS="aivdm ashtech clientdebug earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 navcom nmea ntrip oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar timing tnt tripmate tsip ubx" INPUT_DEVICES="keyboard mouse ps2mouse evdev" KERNEL="linux" LINGUAS="en" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

app-portage/elogviewer-0.6.2-r1 was built with the following:
USE="(multilib)"
Comment 1 Zac Medico gentoo-dev 2011-09-11 17:03:34 UTC
The SyntaxError is due to a a print statement which does not work with python-3.0, so it's not really an issue specific to python-3.2, and therefore it doesn't really block bug 292402. This type of SyntaxError can often be solved by adding 'python_convert_shebangs -r 2 .' to src_prepare, and bugs like this block bug 308257.
Comment 2 Kamen Dokov 2011-09-11 17:21:48 UTC
(In reply to comment #1)
> The SyntaxError is due to a a print statement which does not work with
> python-3.0, so it's not really an issue specific to python-3.2, and therefore
> it doesn't really block bug 292402. This type of SyntaxError can often be
> solved by adding 'python_convert_shebangs -r 2 .' to src_prepare, and bugs like
> this block bug 308257.


Thank you for the clarification and explanation! :)
Comment 3 Kamen Dokov 2011-09-11 20:28:57 UTC
I added it like this
                                                                                                                                                                                      
src_prepare() {                                                                                                                                                                       
<------># Apply patch from Bug 349071 to restore missing newline                                                                                                                      
<------>epatch "${FILESDIR}/${P}-missing_newline.patch"                                                                                                                               
<------>python_convert_shebangs -r 2 .                                                                                                                                                
}                     

the result is :

* QA Notice: command not found:
 * 
 *      /var/tmp/portage/app-portage/elogviewer-0.6.2-r1/temp/environment: line 2230: python_convert_shebangs: command not found

It seems I don't have necessary tools for that.
Which package should I install to be able to use that command ?
Comment 4 Brian Dolbec (RETIRED) gentoo-dev 2011-09-11 21:02:05 UTC
It should be from the python eclass which is not inherited since the ebuild does not use python's distutils to install itself.

Add python to the inherit line:

inherit eutils python

that should fix it.
Comment 5 Brian Dolbec (RETIRED) gentoo-dev 2011-09-11 21:04:21 UTC
adding upstream developer.
Comment 6 Kamen Dokov 2011-09-11 21:25:17 UTC
Created attachment 286171 [details]
working python3.2 ebuild

That ebuild I created thanks to Brian Dolbec (Thank you!)
It works for me!
I'll upload and diff.
Comment 7 Kamen Dokov 2011-09-11 21:25:50 UTC
Created attachment 286173 [details]
diff
Comment 8 Brian Dolbec (RETIRED) gentoo-dev 2011-09-11 23:12:13 UTC
Created attachment 286185 [details]
bumped ebuild fixing the python dep and shebang

Not quite.  The diff is backwards :)  you need to reverse the order of the files to generate it.  Also the python dep is incorrect,  you have;

>=dev-lang/python-3.1.3-r1"

it actually needs a different dep system based in the python eclass.  It in turn computes and adds the correct deps automatically


PYTHON_DEPEND="2:2.6"
SUPPORT_PYTHON_ABIS="0"
Comment 9 Kamen Dokov 2011-09-12 14:18:11 UTC
(In reply to comment #8)
> Created attachment 286185 [details]
> bumped ebuild fixing the python dep and shebang
> 
> Not quite.  The diff is backwards :)  you need to reverse the order of the
> files to generate it.  Also the python dep is incorrect,  you have;
> 
> >=dev-lang/python-3.1.3-r1"
> 
> it actually needs a different dep system based in the python eclass.  It in
> turn computes and adds the correct deps automatically
> 
> 
> PYTHON_DEPEND="2:2.6"
> SUPPORT_PYTHON_ABIS="0"

You are showing me here an advanced gentoo sorcery ;)
That was my first time using diff ever :D
Is 'bumped' means that after sync it should be ok now ?
Comment 10 Brian Dolbec (RETIRED) gentoo-dev 2011-09-12 14:29:52 UTC
No, actually that was a mistake on my part.  It was meant to mean a o.6.2-r2 ebuild.  But once I committed the post it was too late to reword it.

This updated ebuild will most likely be committed to the tree soon.  It sounds like you made the change to the ebuild in your main tree.  If you sync your change will be overwritten again.  You will need to put the modified ebuild in a local overlay so that will not happen.  I cannot commit the update to the main tree, we'll have to wait for the maintainer to do that.

Thank you for your help.
Comment 11 Kamen Dokov 2011-09-12 15:12:17 UTC
(In reply to comment #10)
> No, actually that was a mistake on my part.  It was meant to mean a o.6.2-r2
> ebuild.  But once I committed the post it was too late to reword it.
> 
> This updated ebuild will most likely be committed to the tree soon.  It sounds
> like you made the change to the ebuild in your main tree.  If you sync your
> change will be overwritten again.  You will need to put the modified ebuild in
> a local overlay so that will not happen.  I cannot commit the update to the
> main tree, we'll have to wait for the maintainer to do that.
> 
> Thank you for your help.

I did those experiments into my local overlay ;D
Don't be so modest, you did the whole thing. ;)

Thank you for letting me learn few gentoo magic tricks!
Comment 12 Zac Medico gentoo-dev 2011-09-24 16:50:04 UTC
*** Bug 383767 has been marked as a duplicate of this bug. ***
Comment 13 Zac Medico gentoo-dev 2011-09-24 17:14:31 UTC
*** Bug 383767 has been marked as a duplicate of this bug. ***
Comment 14 Zac Medico gentoo-dev 2011-09-24 17:36:48 UTC
All ebuilds are fixed in cvs now.
Comment 15 Kamen Dokov 2011-09-24 22:42:02 UTC
(In reply to comment #14)
> All ebuilds are fixed in cvs now.

Yes!
Thank you! :D