Bug 149981

Summary: rhpl package scripts do not run on upgrade to FC3
Product: [Fedora] Fedora Reporter: Hasan Mahmood <hasan.mahm>
Component: rhplAssignee: Anaconda Maintenance Team <anaconda-maint-list>
Status: CLOSED NOTABUG QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 3CC: katzj
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-03-15 00:13:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Hasan Mahmood 2005-03-01 05:59:18 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5)
Gecko/20041107 Firefox/1.0

Description of problem:
When I run up2date on my system, I get this output:

Traceback (most recent call last):
  File "/usr/sbin/up2date", line 23, in ?
    from up2date_client import up2dateErrors
  File "/usr/share/rhn/up2date_client/up2dateErrors.py", line 11, in ?
    import up2dateLog
  File "/usr/share/rhn/up2date_client/up2dateLog.py", line 7, in ?
    import config
  File "/usr/share/rhn/up2date_client/config.py", line 19, in ?
    from rhpl.translate import _, N_
  File "/usr/lib/python2.3/site-packages/rhpl/translate.py", line 222,
in ?
    cat = i18n()
  File "/usr/lib/python2.3/site-packages/rhpl/translate.py", line 81,
in __init__
    self.setDomain(domain)
  File "/usr/lib/python2.3/site-packages/rhpl/translate.py", line 106,
in setDomain
    self.updateCachedCatPaths()
  File "/usr/lib/python2.3/site-packages/rhpl/translate.py", line 150,
in updateCachedCatPaths
    encoding = locale.nl_langinfo (locale.CODESET)
AttributeError: 'module' object has no attribute 'nl_langinfo'

Here's the output of the locale command:

LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=


This started happening after I upgraded to FC3 (using CD images).
Prior to that all the scripts worked fine. Other scripts (not just
up2date) show the same behavior (e.g. printconf, etc.).

Version-Release number of selected component (if applicable):
python-2.3.4-13.1 python-2.3.4-13.1 up2date-4.3.47-5

How reproducible:
Always

Steps to Reproduce:
1. Run up2date or printconf from the command line


Actual Results:  This the output:

Traceback (most recent call last):
  File "/usr/sbin/up2date", line 23, in ?
    from up2date_client import up2dateErrors
  File "/usr/share/rhn/up2date_client/up2dateErrors.py", line 11, in ?
    import up2dateLog
  File "/usr/share/rhn/up2date_client/up2dateLog.py", line 7, in ?
    import config
  File "/usr/share/rhn/up2date_client/config.py", line 19, in ?
    from rhpl.translate import _, N_
  File "/usr/lib/python2.3/site-packages/rhpl/translate.py", line 222,
in ?
    cat = i18n()
  File "/usr/lib/python2.3/site-packages/rhpl/translate.py", line 81,
in __init__
    self.setDomain(domain)
  File "/usr/lib/python2.3/site-packages/rhpl/translate.py", line 106,
in setDomain
    self.updateCachedCatPaths()
  File "/usr/lib/python2.3/site-packages/rhpl/translate.py", line 150,
in updateCachedCatPaths
    encoding = locale.nl_langinfo (locale.CODESET)
AttributeError: 'module' object has no attribute 'nl_langinfo'


Additional info:

Comment 1 Hasan Mahmood 2005-03-07 16:42:33 UTC
Is anyone looking at this?

Comment 2 Jeremy Katz 2005-03-14 17:07:49 UTC
This works fine for me here.  Can you give the output of the following?

rpm -V python rhpl
python -c 'import locale ; print locale.nl_langinfo(locale.CODESET)'

Comment 3 Hasan Mahmood 2005-03-14 22:40:26 UTC
[hmahmood@karachi ~]$ rpm -V python rhpl
....L...    /usr/bin/python
[hmahmood@karachi ~]$ python -c 'import locale ; print
locale.nl_langinfo(locale.CODESET)'
Traceback (most recent call last):
  File "<string>", line 1, in ?
AttributeError: 'module' object has no attribute 'nl_langinfo'

(In reply to comment #2)
> This works fine for me here.  Can you give the output of the following?
> 
> rpm -V python rhpl
> python -c 'import locale ; print locale.nl_langinfo(locale.CODESET)'

Comment 4 Jeremy Katz 2005-03-14 23:07:14 UTC
This looks like /usr/bin/python is a symlink when it shouldn't be.  What does
'ls -l /usr/bin/python' show?

Comment 5 Hasan Mahmood 2005-03-14 23:18:40 UTC
[hmahmood@karachi ~]$ ls -l /usr/bin/python 
lrwxrwxrwx  1 root root 9 Mar  7 16:05 /usr/bin/python -> python2.3


(In reply to comment #4)
> This looks like /usr/bin/python is a symlink when it shouldn't be.  What does
> 'ls -l /usr/bin/python' show?

Comment 6 Hasan Mahmood 2005-03-14 23:20:04 UTC
Here is some more info:

[hmahmood@karachi ~]$ rpm -qif /usr/bin/python2.3
Name        : python                       Relocations: (not relocatable)
Version     : 2.3.4                             Vendor: (none)
Release     : 13.1                          Build Date: Mon 07 Mar 2005 03:15:25
PM CST
Install Date: Mon 07 Mar 2005 03:29:55 PM CST      Build Host:
karachi.dy.natinst.com
Group       : Development/Languages         Source RPM: python-2.3.4-13.1.src.rpm
Size        : 20470092                         License: PSF - see LICENSE
Signature   : (none)
URL         : http://www.python.org/
Summary     : An interpreted, interactive, object-oriented programming language.
Description :
Python is an interpreted, interactive, object-oriented programming
language often compared to Tcl, Perl, Scheme, or Java. Python includes
modules, classes, exceptions, very high-level dynamic data types, and
dynamic typing. Python supports interfaces to many system calls and
libraries, as well as to various windowing systems (X11, Motif, Tk,
Mac, and MFC).

Programmers can write new built-in modules for Python in C or C++.
Python can be used as an extension language for applications that need
a programmable interface. This package contains most of the standard
Python modules, as well as modules for interfacing to the Tix widget
set for Tk and RPM.

Note that documentation for Python is provided in the python-docs
package.


Comment 7 Jeremy Katz 2005-03-15 00:13:51 UTC
That's not the python package that we shipped... the build host isn't correct.

Comment 8 Hasan Mahmood 2005-03-15 01:26:52 UTC
Yes that is true. I fiddled around with the python rpm. But I was getting this
behavior even before I did that. I built the rpm from the source rpm I
downloaded from one of the Fedora mirrors. Why should this be a problem?