Bug 23221 - up2date fails on run, AttributeError: Up2dateConfig (wrong config is read)
Summary: up2date fails on run, AttributeError: Up2dateConfig (wrong config is read)
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: up2date (Show other bugs)
(Show other bugs)
Version: 6.2
Hardware: i386 Linux
medium
medium
Target Milestone: ---
Assignee: Preston Brown
QA Contact: Jay Turner
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-01-03 13:12 UTC by Need Real Name
Modified: 2015-01-07 23:42 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-02-27 08:53:20 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Need Real Name 2001-01-03 13:12:36 UTC
up2date consistently fails to run on RH 62.

up2date version:

Name        : up2date                      Relocations: (not relocateable)
Version     : 2.1.7                             Vendor: Red Hat, Inc.
Release     : 0.6.x                         Build Date: Thu 21 Dec 2000
08:25:52 PM IST
Install date: Tue 02 Jan 2001 09:29:25 PM IST      Build Host:
porky.devel.redhat.com
Group       : System Environment/Base       Source RPM:
up2date-2.1.7-0.6.x.src.rpm
Size        : 219264                           License: GPL
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Summary     : Automatically update RPMs for a Red Hat Linux Systemrequires
Description :


Errors are from any utility that uses up2date configs, like:

Traceback (innermost last):
  File "/usr/sbin/up2date-config", line 312, in ?
    main()
  File "/usr/sbin/up2date-config", line 307, in main
    gui = Gui()
  File "/usr/sbin/up2date-config", line 55, in __init__
    self.cfg = config.Up2dateConfig()
AttributeError: Up2dateConfig

and same error from up2date. Seems to be because python
(python-1.5.2-27.6.x) also has config.py and the script includes that
config.py instead of up2date's. If I change config to config2 in every
place in up2date (imports and config.Up2dateConfig()), it works.

Comment 1 Preston Brown 2001-02-09 03:52:48 UTC
that shouldn't matter.  Works fine on my RHL 6.2 box.

Can I see the output of:

rpm -V up2date
rpm -V up2date-gnome
rpm -V python


Comment 2 Need Real Name 2001-02-11 12:15:29 UTC
rpm -V up2date
SM?....T c /etc/sysconfig/rhn/up2date
missing    /usr/share/rhn/up2date/config.pyc
S.5....T   /usr/share/rhn/up2date/translate.pyc
S.5....T   /usr/share/rhn/up2date/up2date.py
SM5....T   /usr/share/rhn/up2date/up2date.pyc
rpm -V up2date-gnome
S.5....T   /usr/sbin/up2date-config
S.5....T   /usr/share/rhn/up2date/checklist.pyc
S.5....T   /usr/share/rhn/up2date/configdlg.py
S.5....T   /usr/share/rhn/up2date/configdlg.pyc
S.5....T   /usr/share/rhn/up2date/gui.pyc
S.5....T   /usr/share/rhn/up2date/progress.pyc
rpm -V python
did not produce any output



Comment 3 Cristian Gafton 2001-02-20 01:34:02 UTC
Assigned QA to jturner

Comment 4 Preston Brown 2001-02-26 23:47:21 UTC
You are missing the compiled up2date python config class:

missing    /usr/share/rhn/up2date/config.pyc

Comment 5 Need Real Name 2001-02-27 08:53:09 UTC
Doh.
Yes, it is missing, because *I had to remove it to make it run*.
OK, seems I did not make myself clear.

Python has config. up2date has config. When up2date uses "config" it thinks it's
config for up2date, but apparently it's config for python. If I change every
reference of config to config2, it works. I'm not sure if removing config.pyc
necessary to make it run, but renaming was necessary. I guess these two lines
are the cause:

sys.path.append("/usr/share/rhn/up2date/")
import config

I'm not a big Python pro, but I imply that if you append directory to the path,
it is searched after all others? And if some previous path has config, the
import will be taken from there? Am I wrong?



Comment 6 Preston Brown 2001-03-01 20:52:49 UTC
Look:

Something is _different_ about your system than ANY other Red Hat Linux system
out there.  I'm not sure what, but something.  We don't have this problem on any
of our test boxes.  THOUSANDS of other people are using up2date without this
issue.

This config class you speak of that python has -- we don't ship any "config.py"
class with python by default.  so you have added something to your system.

Comment 7 Preston Brown 2001-03-01 21:00:19 UTC
More info.

[pbrown@xanadu pbrown]$ rpm -q python
python-1.5.2-27.6.x
[pbrown@xanadu pbrown]$ rpm -V python
[pbrown@xanadu pbrown]$ rpm -ql python | grep config
[pbrown@xanadu pbrown]$ rpm -ql python |grep config
[pbrown@xanadu pbrown]$ 



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