Bug 504407 (python-f11-i18n) - Yum hides transaction list and summary
Summary: Yum hides transaction list and summary
Keywords:
Status: CLOSED ERRATA
Alias: python-f11-i18n
Product: Fedora
Classification: Fedora
Component: python
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Seth Vidal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 480514 505045 506227 506460 506660 506958 507029 507055 513157 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-06-06 12:08 UTC by Torsten Rausche
Modified: 2014-01-21 23:09 UTC (History)
21 users (show)

Fixed In Version: 2.6-9.fc11
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-08-07 08:25:14 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
output of 'fc-list' (14.56 KB, text/plain)
2009-06-07 13:41 UTC, Torsten Rausche
no flags Details
output of 'yum list installed "*font*"' (4.57 KB, text/plain)
2009-06-07 13:42 UTC, Torsten Rausche
no flags Details

Description Torsten Rausche 2009-06-06 12:08:21 UTC
Description of problem:
Yum does not show a transaction list or summary if LANG is set to de_DE.UTF-8 (and maybe other locales). Therefore you do not really know which actions you approve.

You can set LANG=C as a workaround.

Version-Release number of selected component (if applicable):
yum-3.2.23-3.fc11.noarch

Comment 1 Torsten Rausche 2009-06-06 12:17:53 UTC
I just reinstalled yum-3.2.22-4.fc11.noarch and it does not have this issue.

Comment 2 seth vidal 2009-06-06 13:41:32 UTC
Can you output what it DOES show b/c I can't replicate that here.
LANG=de_DE.UTF-8 yum install zsh
Geladene Plugins: allowdowngrade, downloadonly, keys, post-transaction-actions,
                : remove-with-leaves, security, show-leaves
fedora                                                   | 2.8 kB     00:00     
updates                                                  | 3.0 kB     00:00     
Einrichten des Installationsprozess
Löse Abhängigkeiten auf
--> Führe Transaktionsprüfung aus
---> Paket zsh.i386 0:4.3.4-8.fc9 markiert, um aktualisiert zu werden
--> Abhängigkeitsauflösung beendet

Abhängigkeiten aufgelöst

================================================================================
 Paket          Arch            Version                 Repository        Grösse
================================================================================
Installieren:
 zsh            i386            4.3.4-8.fc9             fedora            1.9 M

Transaktionszusammenfassung
================================================================================
Installieren          1 Paket(e)         
Aktualisieren         0 Paket(e)         
Entfernen              0 Paket(e)         

Gesamte Downloadgrösse: 1.9 M
Ist dies in Ordnung? [j/N] :j
Lade Pakete herunter:
zsh-4.3.4-8.fc9.i386.rpm                                 | 1.9 MB     00:04     
Führe rpm_check_debug durch
Führe Verarbeitungstest durch
Verarbeitungstest beendet
Verarbeitungstest erfolgreich
Führe Verarbeitung durch
  Installieren   : zsh-4.3.4-8.fc9.i386                                     1/1 

Installiert:
  zsh.i386 0:4.3.4-8.fc9                                                        

Komplett!

Comment 3 Torsten Rausche 2009-06-06 14:25:22 UTC
(In reply to comment #2)
> Can you output what it DOES show b/c I can't replicate that here.
> LANG=de_DE.UTF-8 yum install zsh

# rpm -q yum
yum-3.2.23-3.fc11.noarch

A slightly different example as downloading fails for people already using F11 these days:

# LANG=de_DE.UTF-8 yum remove glibc
Geladene Plugins: changelog, dellsysidplugin2, fastestmirror, presto, refresh-packagekit, security, show-leaves
Einrichten des Entfernungsprozess
Ist dies in Ordnung? [j/N] :
Beende nach Befehl des Benutzers
Komplett!

---

Yes, this is all I see! :(

Comment 4 seth vidal 2009-06-06 14:41:49 UTC
What does your yum.conf say?

Comment 5 Torsten Rausche 2009-06-06 14:44:55 UTC
(In reply to comment #4)
> What does your yum.conf say?  

[main]
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=3

#  This is the default, if you make this bigger yum won't see if the metadata
# is newer on the remote and so you'll "gain" the bandwidth of not having to
# download the new metadata and "pay" for it by yum not having correct
# information.
#  It is esp. important, to have correct metadata, for distributions like
# Fedora which don't keep old packages around. If you don't like this checking
# interupting your command line usage, it's much better to have something
# manually check the metadata once an hour (yum-updatesd will do this).
# metadata_expire=90m

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d

Comment 6 seth vidal 2009-06-06 14:59:45 UTC
disable your plugins one by one until it shows the transaction summary.

one of them is doing it - but I'm not sure which one, yet.

look at changelog and security first.

Comment 7 Torsten Rausche 2009-06-06 15:17:12 UTC
(In reply to comment #6)
> disable your plugins one by one until it shows the transaction summary.

I will try. But I can already tell you that it does not change with the --noplugins option:

# LANG=de_DE.UTF-8 yum --noplugins remove glibc
Einrichten des Entfernungsprozess
Ist dies in Ordnung? [j/N] :
Beende nach Befehl des Benutzers
Komplett!

Comment 8 Torsten Rausche 2009-06-06 15:40:13 UTC
(In reply to comment #6)
> disable your plugins one by one until it shows the transaction summary.

I did as you said and could not find the culprit.

Comment 9 seth vidal 2009-06-06 16:35:59 UTC
okay. Bump up the debug level please and attach all of the output:

yum -d 9 ......


thanks

Comment 10 Torsten Rausche 2009-06-06 17:13:26 UTC
(In reply to comment #9)
> okay. Bump up the debug level please and attach all of the output:
> 
> yum -d 9 ......

# LANG=de_DE.UTF-8 yum -d 9 remove firefox
"blacklist"-Plugin ist deaktiviert
Lade "dellsysidplugin2"-Plugin
Lade "refresh-packagekit"-Plugin
"whiteout"-Plugin ist deaktiviert
Running "postconfig" handler for "dellsysidplugin2" plugin
Config time: 0.298
Running "init" handler for "dellsysidplugin2" plugin
Yum Version: 3.2.23
COMMAND: yum -d 9 remove firefox 
Installroot: /
Ext Commands:

   firefox
Lese lokale RPMDB
rpmdb time: 0.012
Einrichten des Entfernungsprozess
Depsolve time: 2.826
Ist dies in Ordnung? [j/N] :
Beende nach Befehl des Benutzers
Komplett!

Comment 11 seth vidal 2009-06-06 21:40:21 UTC
What kind of shell is it? Gnome terminal? Kde terminal? xterm?

linux virtual terminal?

Comment 12 Torsten Rausche 2009-06-07 11:37:08 UTC
(In reply to comment #11)
> What kind of shell is it? Gnome terminal? Kde terminal? xterm?
> linux virtual terminal?  

This is the standard bash shell. I tried running yum in GNOME terminal, Xterm an Linux virtual terminal, same result everywhere.

Comment 13 seth vidal 2009-06-07 12:59:07 UTC
Can you check to see what fonts you have installed?

Comment 14 Torsten Rausche 2009-06-07 13:23:05 UTC
(In reply to comment #13)
> Can you check to see what fonts you have installed?  

What would you like to see?

* The output of 'yum list installed "*font*"'?
* The output of 'fc-list'?
* Anything else?

Comment 15 seth vidal 2009-06-07 13:33:02 UTC
the first two - that'd be great.

I'm only asking for this b/c I cannot replicate this bug at all so I'm looking at whatever could cause it to NOT display.

Comment 16 Torsten Rausche 2009-06-07 13:41:36 UTC
Created attachment 346783 [details]
output of 'fc-list'

Comment 17 Torsten Rausche 2009-06-07 13:42:22 UTC
Created attachment 346784 [details]
output of 'yum list installed "*font*"'

Comment 18 Sven Lankes 2009-06-07 14:11:57 UTC
I'm also seeing this. yum-3.2.23-3.fc11.noarch and F11/x86_64 with current updates & updates-testing enabled.

Comment 19 seth vidal 2009-06-07 14:17:33 UTC
(In reply to comment #18)
> I'm also seeing this. yum-3.2.23-3.fc11.noarch and F11/x86_64 with current
> updates & updates-testing enabled.  

In german? or in another lang?

Comment 20 Sven Lankes 2009-06-07 14:27:55 UTC
German - my system locale is en_US.UTF-8 and 

LANG=de_DE.UTF-8 yum install zsh 

gets me the missing list and summary.

Same issue with fr_FR.UTF-8.

LANG=C and LANG=en_US.UTF-8 work fine

Comment 21 seth vidal 2009-06-07 21:09:33 UTC
okay, I was testing it on my laptop which is mostly f11 - but not entirely f11 and it doesn't happen. But testing it on the F11-livecd I can make it happen now.

I'll get a fix for it shortly as soon as I figure out what's happening.

thanks

Comment 22 James Antill 2009-06-08 19:31:40 UTC
Ok, some investigation.

 The "main" problem is that this fails:

--- cli.py	2009-06-08 10:59:51.000000000 -0400
+++ /home/james/cli.py	2009-06-08 15:21:01.000000000 -0400
@@ -365,6 +365,7 @@
         #       gain. But it's probably doom to have a different code path.
         lsts = self.listTransaction()
         if self.verbose_logger.isEnabledFor(yum.logginglevels.INFO_1):
+            # sys.stdout.write("%s\n" % lsts.encode(sys.stdout.encoding))
             self.verbose_logger.log(yum.logginglevels.INFO_1, lsts)
         elif not self.conf.assumeyes:
             #  If we are in quiet, and assumeyes isn't on we want to output

...which is what the logging module is doing, in the end. I _think_ this means that "" % is trying to do encoding for bytes, and is using the default encoding of ascii ... which is completely insane, so probable.

 Looking at the logging.StreamHandler() the reason it does the above call is:

    fs = "%s\n"
[...]
    if getattr(self.stream, 'encoding', None) is not None:
        self.stream.write(fs % msg.encode(self.stream.encoding))
    else:
        self.stream.write(fs % msg)

...changing that to something saner like:

            ufs = u"%s\n"
            fs = "%s\n"
[...]
            if isinstance(msg, unicode): # Don't convert between unicode/str
                self.stream.write(ufs % msg)
            else:
                self.stream.write(fs % msg)

...also fixes the problem (and in theory we can use a custom StreamHandler in yum).

Comment 23 James Antill 2009-06-08 19:44:25 UTC
This is what upstream has:

                  if (isinstance(msg, unicode) and
                        getattr(stream, 'encoding', None)):
                        fs = fs.decode(stream.encoding)
                        try:
                            stream.write(fs % msg)
                        except UnicodeEncodeError:
                            #Printing to terminals sometimes fails. For example,
                            #with an encoding of 'cp1251', the above write will
                            #work if written to a stream opened or wrapped by
                            #the codecs module, but fail when writing to a
                            #terminal even when the codepage is set to cp1251.
                            #An extra encoding step seems to be needed.
                            stream.write((fs % msg).encode(stream.encoding))
                    else:
                        stream.write(fs % msg)

...going to check, and then assuming it works beat the python maintainer until we get an update in Fed-11 (just for this bug though, probably).

Comment 24 Fedora Update System 2009-06-08 20:19:47 UTC
python-2.6-9.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/python-2.6-9.fc11

Comment 25 Torsten Rausche 2009-06-08 21:01:45 UTC
(In reply to comment #24)
> python-2.6-9.fc11 has been submitted as an update for Fedora 11.
> http://admin.fedoraproject.org/updates/python-2.6-9.fc11  

Hurray, this helps. Thank you very much.

Comment 26 seth vidal 2009-06-10 13:54:48 UTC
*** Bug 505045 has been marked as a duplicate of this bug. ***

Comment 27 seth vidal 2009-06-10 23:14:33 UTC
*** Bug 480514 has been marked as a duplicate of this bug. ***

Comment 28 Fedora Update System 2009-06-16 01:26:35 UTC
python-2.6-9.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update python'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-6005

Comment 29 seth vidal 2009-06-16 13:19:34 UTC
*** Bug 506227 has been marked as a duplicate of this bug. ***

Comment 30 James Antill 2009-06-17 13:31:38 UTC
*** Bug 506460 has been marked as a duplicate of this bug. ***

Comment 31 Pierre Blavy 2009-06-17 14:06:03 UTC
I've tryed the update : 
su -c 'yum --enablerepo=updates-testing update python'.  

With this update the bug is fixed.
thanks.

Comment 32 seth vidal 2009-06-18 12:18:38 UTC
*** Bug 506660 has been marked as a duplicate of this bug. ***

Comment 33 Fedora Update System 2009-06-19 13:36:55 UTC
python-2.6-9.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 34 Karel Volný 2009-06-19 16:27:23 UTC
*** Bug 506958 has been marked as a duplicate of this bug. ***

Comment 35 James Antill 2009-06-21 05:53:57 UTC
*** Bug 507055 has been marked as a duplicate of this bug. ***

Comment 36 seth vidal 2009-06-22 14:54:34 UTC
*** Bug 507029 has been marked as a duplicate of this bug. ***

Comment 37 Alexey Torkhov 2009-06-29 09:01:56 UTC
The bug is present in rawhide too.

Comment 38 MERCIER Jonathan 2009-07-01 21:26:42 UTC
I post here a console outout (blender is an example):
________________________________________________________________
# yum provides blender
Modules complémentaires chargés : refresh-packagekit
blender-2.48a-21.fc11.x86_64 : 3D modeling, animation, rendering and
                             : post-production
Dépôt         : fedora
Correspondance depuis :



blender-2.48a-21.fc11.x86_64 : 3D modeling, animation, rendering and
                             : post-production
Dépôt         : installed
Correspondance depuis :
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 309, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 178, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 352, in doCommands
    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
  File "/usr/share/yum-cli/yumcommands.py", line 560, in doCommand
    return base.provides(extcmds)
  File "/usr/share/yum-cli/cli.py", line 829, in provides
    callback_has_matchfor=True)
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 2027, in searchPackageProvides
    callback(po, tmpvalues, args)
  File "/usr/share/yum-cli/output.py", line 870, in matchcallback_verbose
    return self.matchcallback(po, values, matchfor, verbose=True)
  File "/usr/share/yum-cli/output.py", line 864, in matchcallback
    print self.fmtKeyValFill(key, item)
  File "/usr/lib64/python2.6/codecs.py", line 351, in write
    data, consumed = self.encode(object, self.errors)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 15: ordinal not in range(128)

Comment 39 Mamoru TASAKA 2009-07-05 15:04:57 UTC
Reopening, still reproducible with

yum-3.2.23-9.fc12.noarch
python-2.6-10.fc12.i586

in LANG=ja_JP.UTF-8

Comment 40 nucleo 2009-07-17 16:47:32 UTC
(In reply to comment #39)
> Reopening, still reproducible with
> 
> yum-3.2.23-9.fc12.noarch
> python-2.6-10.fc12.i586
> 
> in LANG=ja_JP.UTF-8  

I can confirm that bug still reproducible with LANG=ru_RU.UTF-8 in rawhide.

Comment 41 seth vidal 2009-07-22 11:31:17 UTC
*** Bug 513157 has been marked as a duplicate of this bug. ***

Comment 42 Jens Petersen 2009-07-24 06:04:45 UTC
(I have never seen this with f11 fwiw.)

Comment 43 Mamoru TASAKA 2009-08-07 08:25:14 UTC
With current rawhide this issue does not appear.
As this bug is fixed on F-11 (according to this bug), I think
this bug can be closed, closing.


Note You need to log in before you can comment on or make changes to this bug.