Bug 491406
Summary: | yum info crashes on empty %description` | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Harriet Severino <hseverino> | ||||||
Component: | yum | Assignee: | James Antill <james.antill> | ||||||
Status: | CLOSED ERRATA | QA Contact: | BaseOS QE Security Team <qe-baseos-security> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | low | ||||||||
Version: | 5.2 | CC: | bperkins, ffesti, herrold, james.antill, pmatilai, rlerch, tim.lauridsen | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: |
Because every rpm package should have a %description field, yum info did not allow for packages where this field might be empty. When yum info encountered such a package, it would crash. Yum info now allows for empty %description fields in packages and will not crash when it encounters an empty field.
|
Story Points: | --- | ||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2009-09-02 07:34:16 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: | |||||||||
Attachments: |
|
Description
Harriet Severino
2009-03-20 19:34:33 UTC
With what rpm building tool was the package built? Can you attach a file with the crash, too? I've done some tests here. With a <description></description> field in the xml metadata and db metadata - yum behaves properly. I cannot generate a non-existent description field in the rpm itself. rpmbuild won't let me. So I echo russ' question. please provide the crash, how you made the rpm itself and, if possible, attach the rpm. Thanks Created attachment 336340 [details]
rpm to re-create bug
Created attachment 336342 [details]
spec file to re-create bug
Output from yum error: hseverino@flurry8:/usr/src/redhat/RPMS/x86_64>yum info foo Loading "security" plugin Loading "rhnplugin" plugin *Note* Red Hat Network repositories are not listed below. You must run this command as root to access RHN repositories. RHN support will be disabled. Available Packages Name : foo Arch : x86_64 Version: 1 Release: 1 Size : 1.1 k Repo : SiCortex Inhouse Summary: foo Traceback (most recent call last): File "/usr/bin/yum", line 29, in ? yummain.main(sys.argv[1:]) File "/usr/share/yum-cli/yummain.py", line 105, in main result, resultmsgs = base.doCommands() File "/usr/share/yum-cli/cli.py", line 293, in doCommands return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds) File "/usr/share/yum-cli/yumcommands.py", line 178, in doCommand rap = base.listPkgs(ypl.available, 'Available Packages', basecmd) File "/usr/share/yum-cli/output.py", line 306, in listPkgs self.infoOutput(pkg) File "/usr/share/yum-cli/output.py", line 277, in infoOutput print _("Description:\n%s") % enc(pkg.description) File "/usr/share/yum-cli/output.py", line 258, in enc if len(s) > 0: TypeError: len() of unsized object The package you attached is pretty badly corrupted. I built a package from the spec file you attached and that operates just fine. Can you rebuild from your spec file and generate the same error? Output from yum error: hseverino@flurry8:/usr/src/redhat/RPMS/x86_64>yum info foo Loading "security" plugin Loading "rhnplugin" plugin *Note* Red Hat Network repositories are not listed below. You must run this command as root to access RHN repositories. RHN support will be disabled. Available Packages Name : foo Arch : x86_64 Version: 1 Release: 1 Size : 1.1 k Repo : SiCortex Inhouse Summary: foo Traceback (most recent call last): File "/usr/bin/yum", line 29, in ? yummain.main(sys.argv[1:]) File "/usr/share/yum-cli/yummain.py", line 105, in main result, resultmsgs = base.doCommands() File "/usr/share/yum-cli/cli.py", line 293, in doCommands return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds) File "/usr/share/yum-cli/yumcommands.py", line 178, in doCommand rap = base.listPkgs(ypl.available, 'Available Packages', basecmd) File "/usr/share/yum-cli/output.py", line 306, in listPkgs self.infoOutput(pkg) File "/usr/share/yum-cli/output.py", line 277, in infoOutput print _("Description:\n%s") % enc(pkg.description) File "/usr/share/yum-cli/output.py", line 258, in enc if len(s) > 0: TypeError: len() of unsized object what ver of yum and rpm and rpm-python is this? rpm -q yum rpm rpm-python I have built this rpm multiple times, with the same result. I 1) build the rpm with > rpmbuld foo-bar.spec 2) copy the rpm file into the repo 3) In the repo > createrepo --update . 4) back on the build machine: > yum info foo > rpm -q yum rpm rpm-python
yum-3.2.8-9.el5
rpm-4.4.2-48.el5
rpm-python-4.4.2-48.el5
> rpm -q yum rpm rpm-python
yum-3.2.8-9.el5
rpm-4.4.2-48.el5
rpm-python-4.4.2-48.el5
get rid of the --update to createrepo and see if everything gets more sane. I did a > createrepo . and >yum info foo gives the same results. okay, Found the problem - it was fixed in yum 3.2.21 but not backported to rhel. Great. CanI get the rpm? http://yum.baseurl.org/ lists src rpms and src tarballs, and I'm just not that masochistic. Release note added. If any revisions are required, please set the "requires_release_notes" flag to "?" and edit the "Release Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Because every rpm package should have a %description field, yum info did not allow for packages where this field might be empty. When yum info encountered such a package, it would crash. Yum info now allows for empty %description fields in packages and will not crash when it encounters an empty field. An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2009-1419.html |