Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 475798 - app-laptop/samsung-tools-2.1 - fix shebangs in python scripts
Summary: app-laptop/samsung-tools-2.1 - fix shebangs in python scripts
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Brendan Horan
URL:
Whiteboard:
Keywords:
Depends on: 484034
Blocks:
  Show dependency tree
 
Reported: 2013-07-05 07:01 UTC by July Tikhonov
Modified: 2015-06-17 01:21 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description July Tikhonov 2013-07-05 07:01:09 UTC
Scripts in samsung-tools are written for python2, but are prefixed with '#!/usr/bin/env python', which causes problems if the selected python version is python3. DBus service does not start, probably because of import error. Applications samsung-tools and samsung-tools-preferences does not start because of syntax error. Reemerging samsung-tools does not help.

It was sufficient for me to edit all files in $(grep '/usr/bin/env python' $(equery -qC files -f obj samsung-tools) -l), changing the shebang line to '#!/usr/bin/env python2'.

The problem occured after recent update, which added 'python2_7' to PYTHON_TARGETS of samsung-tools.

$ emerge --info samsung-tools python
Portage 2.1.12.2 (default/linux/amd64/13.0/desktop/gnome, gcc-4.6.3, glibc-2.15-r3, 3.8.13-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.8.13-gentoo-x86_64-Intel-R-_Core-TM-_i5-3317U_CPU_@_1.70GHz-with-gentoo-2.2
KiB Mem:     7781396 total,   4111820 free
KiB Swap:    3687420 total,   3687420 free
Timestamp of tree: Fri, 05 Jul 2013 04:45:01 +0000
ld GNU ld (GNU Binutils) 2.22
app-shells/bash:          4.2_p45
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.5, 3.2.5-r1, 3.3.2-r1
dev-util/cmake:           2.8.10.2-r2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.6, 1.12.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.7 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo x-portage
Installed sets: @chess, @gnome3, @jeolm, @my-tools, @steam
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.yandex.ru/gentoo-distfiles/ ftp://mirror.yandex.ru/gentoo-distfiles/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync2.ru.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 bash-completion berkdb bluetooth branding bzip2 cairo cdda cdr cli colord consolekit cracklib crypt cups cxx dbus djvu dri dts dvd dvdr eds emboss encode evo exif fam ffmpeg fftw firefox flac fortran gdbm gif gimp gnome gnome-keyring gnome-online-accounts gnuplot gpm gstreamer gtk iconv icu ipv6 jpeg kerberos latex lcms ldap libnotify libsecret lzma mad mmx mng modules mp3 mp4 mpeg mplayer mudflap multilib nautilus ncurses networkmanager nls nptl ogg opengl openmp pam pango pch pcre pdf png policykit postgres ppds pulseaudio python qt3support readline sdl session socialweb spell sse sse2 sse3 ssl startup-notification svg tcpd threads tiff truetype udev udisks unicode upower usb vim-syntax vorbis wifi wxwidgets x264 xcb xml xpm xv xvid zlib" ABI_X86="64" ALSA_CARDS="hda-intel" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_US ru ru_RU" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="i965 intel"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

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

app-laptop/samsung-tools-2.1 was built with the following:
USE="" PYTHON_TARGETS="python2_7"


dev-lang/python-2.7.5 was built with the following:
USE="doc examples gdbm ipv6 (multilib) ncurses readline sqlite ssl threads tk (wide-unicode) xml -berkdb -build -hardened -wininst" ABI_X86="64"
CFLAGS="-march=native -O2 -pipe -fwrapv"
CXXFLAGS="-march=native -O2 -pipe -fwrapv"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -L."


dev-lang/python-3.2.5-r1 was built with the following:
USE="doc examples gdbm ipv6 (multilib) ncurses readline sqlite ssl threads tk (wide-unicode) xml -build -hardened -wininst" ABI_X86="64"
CFLAGS="-march=native -O2 -pipe -fwrapv"
CXXFLAGS="-march=native -O2 -pipe -fwrapv"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -L."


dev-lang/python-3.3.2-r1 was built with the following:
USE="examples gdbm ipv6 (multilib) ncurses readline sqlite ssl threads tk xml -build -doc -hardened -wininst" ABI_X86="64"
CFLAGS="-march=native -O2 -pipe -fwrapv"
CXXFLAGS="-march=native -O2 -pipe -fwrapv"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -L."

$ eselect python list
Available Python interpreters:
  [1]   python2.7
  [2]   python3.2 *
  [3]   python3.3
Comment 1 Yixun Lan archtester gentoo-dev 2015-06-16 05:18:43 UTC
assign to Brendan Horan, since he's interested to maintain this ebuild.
Comment 2 July Tikhonov 2015-06-16 05:29:06 UTC
This bug is already solved in samsung-tools-2.3.1. Dropping samsung-tools-2.1 would solve the issue.

Alternatively, ebuild for samsung-tools-2.3.1 can be copied to samsung-tools-2.1-r1 with a minor edit: all occurences of /usr/share/samsung-tools should be replaced with /usr/lib/samsung-tools.
Comment 3 Brendan Horan 2015-06-16 05:34:04 UTC
Yep I can see its fixed in 484034.

I think it may be wise to try ans stabilize 2.3.1 when we can. 
However happy to take guidance on this issue.
Comment 4 Ian Delaney (RETIRED) gentoo-dev 2015-06-17 01:14:32 UTC
(In reply to Brendan Horan from comment #3)
> Yep I can see its fixed in 484034.
> 
> I think it may be wise to try and stabilize 2.3.1 when we can. 
> However happy to take guidance on this issue.

Yes, make a bug of a std. bug of 'request stable' type. There are always many in place in bugzilla at any one time to use as a model. Editing the stabled samsung-tools-2.1.ebuild would need a revbump anyway. Just bear in mind the std waiting period is 30 days bug free after addition to portage.  You can make the bug but it needs a dev to CC arches and make it 'active' so just ping us at the time.
Comment 5 Brendan Horan 2015-06-17 01:20:39 UTC
> Yes, make a bug of a std. bug of 'request stable' type. There are always
> many in place in bugzilla at any one time to use as a model. Editing the
> stabled samsung-tools-2.1.ebuild would need a revbump anyway. Just bear in
> mind the std waiting period is 30 days bug free after addition to portage. 
> You can make the bug but it needs a dev to CC arches and make it 'active' so
> just ping us at the time.

Thanks for the guidance Ian.

I will raise a stabilization request in +30days.
I've put 3.2.1 on my laptop now and will test it as well.

thanks!
Comment 6 Brendan Horan 2015-06-17 01:21:14 UTC
Fixed in 484034