Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 232761 - app-admin/python-updater-0.5 fails to report it, when no previous python version was found
Summary: app-admin/python-updater-0.5 fails to report it, when no previous python vers...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2008-07-23 15:27 UTC by Richard Hartmann
Modified: 2008-08-25 09:57 UTC (History)
1 user (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 Richard Hartmann 2008-07-23 15:27:09 UTC
++ get_old_pyver
++ for old in 2.5 2.4 2.3 2.2 2.1
++ [[ 2.5 != \2\.\5 ]]
++ for old in 2.5 2.4 2.3 2.2 2.1
++ [[ 2.4 != \2\.\5 ]]
++ [[ -e /usr/bin/python2.4 ]]
++ for old in 2.5 2.4 2.3 2.2 2.1
++ [[ 2.3 != \2\.\5 ]]
++ [[ -e /usr/bin/python2.3 ]]
++ for old in 2.5 2.4 2.3 2.2 2.1
++ [[ 2.2 != \2\.\5 ]]
++ [[ -e /usr/bin/python2.2 ]]
++ for old in 2.5 2.4 2.3 2.2 2.1
++ [[ 2.1 != \2\.\5 ]]
++ [[ -e /usr/bin/python2.1 ]]
++ eerror 'Couldn'\''t determine any previous Python version(s).'
++ [[ no == \y\e\s ]]
++ [[ yes != \y\e\s ]]
++ echo -e ' * Couldn'\''t determine any previous Python version(s).'
++ local name=rc-scripts
++ [[ /usr/sbin/python-updater != \/\s\b\i\n\/\r\u\n\s\c\r\i\p\t\.\s\h ]]
++ name=python-updater
++ esyslog daemon.err rc-scripts 'Couldn'\''t determine any previous Python version(s).'
++ local pri=
++ local tag=
++ [[ -x /usr/bin/logger ]]
++ pri=daemon.err
++ tag=rc-scripts
++ shift 2
++ [[ -z Couldn't determine any previous Python version(s). ]]
++ /usr/bin/logger -p daemon.err -t rc-scripts -- 'Couldn'\''t determine any previous Python version(s).'
++ return 0
++ LAST_E_CMD=eerror
++ return 0
++ return 1
+ OLD_PY_VER=' * Couldn'\''t determine any previous Python version(s).'
+ [[ 1 -ne 0 ]]
+ exit 1


Reproducible: Always

Steps to Reproduce:
1. upgrade your python version
2. remove the previous version
3. run python-updater-0.5
4. compare the result with the command "bash -x1 /usr/sbin/python-updater"
Actual Results:  
python-updater fails to report, that it hasn't found any previous version. 
python-updater stays quiet.

Expected Results:  
"Couldn't determine any previous Python version(s)"

Portage 2.1.4.4 (default/linux/x86/2008.0/desktop, gcc-3.4.6, glibc-2.6.1-r0, 2.6.24-gentoo-r8 i686)
=================================================================
System uname: 2.6.24-gentoo-r8 i686 AMD Athlon(tm) 64 X2 Dual Core Processor 4200+
Timestamp of tree: Tue, 22 Jul 2008 15:45:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.4.4-r13, 2.5.2-r5
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=athlon64 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://pandemonium.tiscali.de/pub/gentoo/ http://de-mirror.org/distro/gentoo/ ftp://de-mirror.org/distro/gentoo/ ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo"
LC_ALL="de_DE@euro"
LDFLAGS="-Wl,-O1"
LINGUAS="de"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
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.europe.gentoo.org/gentoo-portage"
USE="X acl acpi alsa arts asf berkdb bluetooth branding bzip2 cairo cdr cli cracklib crypt cups dbus dri dvd dvdr dvdread eds emboss encode esd evo fam ffmpeg firefox fortran gdbm gif gnome gpm gstreamer gtk hal iconv ipv6 isdnlog java jpeg kde kdeenablefinal ldap libnotify lm_sensors mad midi mikmod mime mmx mp3 mpeg mplayer mudflap ncurses nls nptl nptlonly nsplugin ntfs ogg opengl openmp pam pcre pda pdf perl png ppds pppd python qt3 qt3support qt4 quicktime readline reflection sdl session spell spl sse sse2 ssl startup-notification svg tcpd tiff truetype unicode vcd vorbis win32codecs wmp x86 xine xml xorg xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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 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 mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Ali Polatel (RETIRED) gentoo-dev 2008-07-24 01:02:32 UTC
Either run python-updater _before_ you uninstall your old python or use the -o command switch to set your old python version. There's no sane way to determine your old python version after you uninstall it.
The most logical way is to check old site-packages/ directories for leftovers but that will fail if you only have packages that didn't install anything under site-packages/ but _still_ need to be rebuilt.
-o is your friend, this is exactly the reason why it's there.
Comment 2 Richard Hartmann 2008-07-24 06:49:26 UTC
I understand what the problems is. What I miss is the error message "Couldn't determine any previous Python version(s)".

Shouldn't python-updater-0.5 print this error message in any case?
Comment 3 Richard Hartmann 2008-07-26 10:03:24 UTC
See my last comment.
Comment 4 Gerben Vos 2008-08-23 14:35:04 UTC
Yes, the fact that python-updater says nothing is confusing. A user might conclude that there's nothing to do. It would be nice if it instead output a message like "Only one Python version installed, use the -o option to indicate old version number."

Okay, *after* the first time you've inadvertently deleted an old python version before running python-updater, and trawling the web and finding out that you need to use python-updater anyway, you will know what to do. But for first-time python-updater users, something like this would be a simple helpful message pointing the user in the right direction.
Comment 5 Ali Polatel (RETIRED) gentoo-dev 2008-08-25 09:23:43 UTC
This should be fixed in svn¹ and will be released with the new version soon:
alip@trippin> eselect python list
Available python interpreters:
  [1]   python2.6 *
alip@trippin> python-updater
 * Couldn't determine any previous Python version(s).
 * Use -o OLD_PYTHON_VERSION to specify your old python version.

¹: http://overlays.gentoo.org/proj/python/changeset/106
Comment 6 Ali Polatel (RETIRED) gentoo-dev 2008-08-25 09:57:26 UTC
Version 0.6 should fix this, thanks for reporting.