Bug 472606 - Pirut crashes when editing RHN repos
Summary: Pirut crashes when editing RHN repos
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: pirut
Version: 5.4
Hardware: i386
OS: Linux
high
urgent
Target Milestone: beta
: ---
Assignee: James Antill
QA Contact: Karel Srot
URL:
Whiteboard:
Depends On: 437822
Blocks: 743405 807971
TreeView+ depends on / blocked
 
Reported: 2008-11-21 22:53 UTC by Edward David
Modified: 2018-11-30 23:08 UTC (History)
13 users (show)

Fixed In Version: pirut-1.3.28-20.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-01-08 07:35:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Fix crash when editing repositories without a repo file (740 bytes, patch)
2008-12-19 17:15 UTC, Olivier Fourdan
no flags Details | Diff
Patch for pirut, which disable editing Satellite channel (655 bytes, patch)
2010-02-24 12:54 UTC, Miroslav Suchý
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0069 0 normal SHIPPED_LIVE pirut bug fix update 2013-01-07 15:27:23 UTC

Description Edward David 2008-11-21 22:53:05 UTC
Description of problem:
Unable to do any updates Repository Manager location for version 5 is empty

Version-Release number of selected component (if applicable):


How reproducible:
Every time I try to do an update

Steps to Reproduce:
1.Run pirut
2.
3.
  
Actual results:
Update aborts

Expected results:
Update should work

Additional info:
Component: pirut
Summary: TB6761ebd5 posixpath.py:378:normpath:AttributeError: 'NoneType' object has no attribute 'startswith'

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/pirut/RepoSelector.py", line 306, in _edit
    path = os.path.normpath(r.repofile)
  File "/usr/lib/python2.4/posixpath.py", line 378, in normpath
    initial_slashes = path.startswith('/')
AttributeError: 'NoneType' object has no attribute 'startswith'

Local variables in innermost frame:
path: None

Comment 1 James Antill 2008-11-22 05:43:38 UTC
what does "yum repolist all" say?

Comment 2 James Antill 2008-11-22 05:44:02 UTC
Also what version of yum (yum --version)?

Comment 3 Olivier Fourdan 2008-12-19 17:15:38 UTC
Created attachment 327467 [details]
Fix crash when editing repositories without a repo file

Hi,

This happens when editing repositories that are not from a yum ".repo" file but rather from a yum plug-in such as RHN.

To reproduce, in Red Hat Enterprise Linux 5.2, register the system in RHN and  remove all ".repo" files from /etc/yum.repos.d/, then try to edit the repositories defined by RHN.

The attached patch adds a special case for that, and displays an error message when the repository cannot be edited.

Cheers,
Olivier.

Comment 4 James Antill 2009-01-14 17:26:07 UTC
Working around this isn't a bad idea, but really RHN needs to be fixed. 5.3 has the ability to have a config. section for each repo. and 5.4 should expand that. If that means all the RHN repos. have a repofile, I'm not sure.

Comment 8 Thomas Kloeber 2009-12-30 10:28:31 UTC
I am running into the exact same problem when running Package Manager and trying to view/edit a repository entry with RH 2.6.18-164.9.1.el5 (more than a year after the bug was reported and a workaround proposed).

Is there a "real" fix available by now and if so, where can I find it?

Thomas

Comment 9 James Antill 2009-12-30 15:25:17 UTC
Thomas, what version of yum-rhn-plugin are you using?

Comment 10 Thomas Kloeber 2009-12-31 11:19:17 UTC
it's version 0.5.4-13:

[root@dilbert ~]# yum --version
3.2.22
  Installed: rpm-4.4.2.3-18.el5.x86_64 at 2009-11-03 09:56
  Built    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> at 2009-07-24 05:58
  Committed: Panu Matilainen <pmatilai> at 2009-07-24 22:00

  Installed: yum-3.2.22-20.el5.noarch at 2009-11-03 09:56
  Built    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> at 2009-07-07 19:15
  Committed: James Antill <jantill> at 2009-07-07 22:00

  Installed: yum-metadata-parser-1.1.2-3.el5.x86_64 at 2009-11-03 09:55
  Built    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> at 2009-04-06 14:15
  Committed: James Antill <james.antill> at 2009-04-06 22:00

  Installed: yum-rhn-plugin-0.5.4-13.el5.noarch at 2009-11-03 09:57
  Built    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> at 2009-08-03 18:33
  Committed: Pradeep Kilambi <pkilambi> at 2009-08-03 22:00
[root@dilbert ~]#

Comment 12 Miroslav Suchý 2010-01-04 12:42:19 UTC
FYI the "real fix" part is duplicate of BZ 437822.
Please try to reproduce it yum-rhn-plugin-0.5.4-15.el5.noarch.rpm (available in brew) and either fix problem (if any) in pirut. Or close as duplicate of 437822.
Reseting owner and component back to pirut.

Comment 13 Thomas Kloeber 2010-01-05 09:01:09 UTC
(In reply to comment #12)
> FYI the "real fix" part is duplicate of BZ 437822.
> Please try to reproduce it yum-rhn-plugin-0.5.4-15.el5.noarch.rpm (available in
> brew) and either fix problem (if any) in pirut. Or close as duplicate of
> 437822.
> Reseting owner and component back to pirut.  

sorry, I don't understand what you want me to do.
What do you mean by "try to reproduce it yum-rhn-plugin-0.5.4-15.el5.noarch.rpm"?
What do you mean by "fix problem (if any) in pirut"?

How do I get the fix for "BZ 437822"? Bugzilla tells me, that I'm not allowed to access this bug. So I can't read what it's about nor do I know, where/how to get the "real fix".

Thanx,

Comment 14 Miroslav Suchý 2010-01-05 09:29:13 UTC
(In reply to comment #13)
This was meant as comment for pirut maintainer, sorry for confusion.
There is no need for any action from you Thomas.

Comment 22 Miroslav Suchý 2010-02-24 12:53:05 UTC
That traceback only happen when you click "Edit repo". If you click on checkbox i.e. enable or disable that repo you do not get any error. 
Editing repo which exports yum-rhn-plugin have no sense. Such repo is in fact channel. And you coud not edit its label, description, location or mirror list and GPG key per channel is not supported.

IMO correct behaviour is just show dialog with message "This repository could not be edited." for such repos.

I'm attaching patch which do exactly that. Flipping back to James/Pirut

Comment 23 Miroslav Suchý 2010-02-24 12:54:25 UTC
Created attachment 396054 [details]
Patch for pirut, which disable editing Satellite channel

Comment 26 Yash 2010-05-13 19:36:28 UTC
I got this report when I try to edit repo list. I am not sure how do I add extra repo. I wanted to install cobbler from extra repo.

--
Component: pirut
Summary: TB6761ebd5 posixpath.py:378:normpath:AttributeError: 'NoneType' object has no attribute 'startswith'

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/pirut/RepoSelector.py", line 306, in _edit
    path = os.path.normpath(r.repofile)
  File "/usr/lib64/python2.4/posixpath.py", line 378, in normpath
    initial_slashes = path.startswith('/')
AttributeError: 'NoneType' object has no attribute 'startswith'

Local variables in innermost frame:
path: None

---

# rpm -qa | egrep 'firstboot|rhn-' | sort
firstboot-1.4.27.8-1.el5
firstboot-tui-1.4.27.8-1.el5
rhn-check-0.4.20-33.el5_5.1
rhn-client-tools-0.4.20-33.el5_5.1
rhn-setup-0.4.20-33.el5_5.1
rhn-setup-gnome-0.4.20-33.el5_5.1
yum-rhn-plugin-0.5.4-15.el5

# yum repolist all   
repo id           repo name                                    status
rhel-debuginfo       Red Hat Enterprise Linux 5Server - x86_64 -  disabled
rhel-debuginfo-beta  Red Hat Enterprise Linux 5Server Beta - x86_ disabled
rhel-x86_64-server-5 Red Hat Enterprise Linux (v. 5 for 64-bit x8 enabled: 9,391
repolist: 9,391

# yum --version
3.2.22
  Installed: rpm-4.4.2.3-18.el5.x86_64 at 2010-05-12 22:06
  Built    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> at 2009-07-24 05:58
  Committed: Panu Matilainen <pmatilai> at 2009-07-24 22:00

  Installed: yum-3.2.22-26.el5.noarch at 2010-05-12 22:08
  Built    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> at 2010-02-23 16:50
  Committed: James Antill <jantill> at 2010-02-23 22:00

  Installed: yum-metadata-parser-1.1.2-3.el5.x86_64 at 2010-05-12 22:06
  Built    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> at 2009-04-06 14:15
  Committed: James Antill <james.antill> at 2009-04-06 22:00

  Installed: yum-rhn-plugin-0.5.4-15.el5.noarch at 2010-05-12 22:09
  Built    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> at 2009-12-21 11:59
  Committed: Milan Zazrivec <mzazrivec> at 2009-12-21 22:00


-----I also got this this error report at firstboot. I am not sure if it is related to it. 

# cat firstboot.1273705072.77

Traceback (most recent call last):
  File "/usr/share/firstboot/firstbootWindow.py", line 266, in nextClicked
    result = module.apply(self.notebook)
  File "/usr/share/firstboot/modules/rhn_login_gui.py", line 117, in apply
    elif rhnregGui.activateSubscriptionShouldBeShown():
  File "/usr/share/rhn/up2date_client/rhnregGui.py", line 631, in activateSubscriptionShouldBeShown
    registrationNumberStatus, oemNumberStatus = autoActivateNumbersOnce()
  File "/usr/share/rhn/up2date_client/rhnregGui.py", line 1754, in autoActivateNumbersOnce
    organization)
  File "/usr/share/rhn/up2date_client/rhnreg.py", line 736, in activateRegistrationNumber
    result = server.registration.activate_registration_number(username, password, registrationNumber, other)
  File "/usr/share/rhn/up2date_client/rhnserver.py", line 50, in __call__
    return rpcServer.doCall(method, *args, **kwargs)
  File "/usr/share/rhn/up2date_client/rpcServer.py", line 202, in doCall
    ret = method(*args, **kwargs)
  File "/usr/lib64/python2.4/xmlrpclib.py", line 1096, in __call__
    return self.__send(self.__name, args)
  File "/usr/share/rhn/up2date_client/rpcServer.py", line 47, in _request1
    sys.exit(-1)
SystemExit: -1

Comment 28 RHEL Program Management 2010-08-09 18:47:42 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 29 James Antill 2010-09-27 15:49:25 UTC
Adding the patch in comment #23 is fine, although I think it'd be nicer for the plugin to do the right thing here (as a bunch of stuff can be edited now).

Comment 30 RHEL Program Management 2011-05-31 13:59:35 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 31 RHEL Program Management 2011-09-23 00:24:06 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 32 David Mair 2011-10-16 03:04:16 UTC
Raising priority on this and adding to 5.9 tracker. This has missed several updates and we have a patch to resolve the problem.

Comment 34 RHEL Program Management 2012-04-02 10:30:44 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.

Comment 42 errata-xmlrpc 2013-01-08 07:35:06 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0069.html


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