[Bug 1253462] New: Error in http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch16s03s05.html

bugzilla at redhat.com bugzilla at redhat.com
Thu Aug 13 18:13:23 UTC 2015


https://bugzilla.redhat.com/show_bug.cgi?id=1253462

            Bug ID: 1253462
           Summary: Error in
                    http://docs.fedoraproject.org/en-US/Fedora_Draft_Docum
                    entation/0.1/html/RPM_Guide/ch16s03s05.html
           Product: Fedora Documentation
           Version: devel
         Component: rpm-guide
          Severity: low
          Assignee: bcotton+fedora at gmail.com
          Reporter: nbasanes at cisco.com
        QA Contact: docs-qa at lists.fedoraproject.org
                CC: bcotton+fedora at gmail.com, pkovar at redhat.com,
                    zach at oglesby.co



Created attachment 1062752
  --> https://bugzilla.redhat.com/attachment.cgi?id=1062752&action=edit
This attachment is a screenshot of a more readable result.

Description of problem:

The Python code section at
http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch16s03s05.html
has an error in the following code: 

    # Dependencies
    print "Provides:"
    print h.dsFromHeader('providename')

    print "Requires:"
    print h.dsFromHeader('requirename')

    if h.dsFromHeader('obsoletename'):
        print "Obsoletes:"
        print h.dsFromHeader('obsoletename')

    if h.dsFromHeader('conflictname'):
        print "Conflicts:"
        print h.dsFromHeader('conflictname')

print h.dsFromHeader('conflictname') outputs <rpm.ds object at 0xb77584b8>. 

h.dsFromHeader('conflictname'), without the "print" word, outputs it right. 


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

How reproducible:


Steps to Reproduce:
1. Copy the python code from the page to a file called rpminfo.py on a computer
that has the older version of Python, Python 2.
2. Run the Python code, by running the "cd" command until you get to the folder
that contains rpminfo.py.  
3. Run rpminfo.py by entering the command python rpminfo.py. 

Actual results:

Provides:
<rpm.ds object at 0xb77584b8>
Requires:
<rpm.ds object at 0xb77584b8>

Expected results:

Provides:
P config(httpd) = 2.2.15-39.el6.centos
Requires:
R libapr-1.so.0

Additional info:

The members of the object returned by dsFromHeader have integer indexes, since
the following code produces a more readable result: 

     # Dependencies
    print "Provides:"
    print h.dsFromHeader('providename')[0]

    print "Requires:"
    print h.dsFromHeader('requirename')[0]

-- 
You are receiving this mail because:
You are the QA Contact for the bug.


More information about the docs-qa mailing list