Bug 1253462 - Error in http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch16s03s05.html
Error in http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/h...
Status: CLOSED WONTFIX
Product: Fedora Documentation
Classification: Fedora
Component: rpm-guide (Show other bugs)
devel
Unspecified Linux
unspecified Severity low
: ---
: ---
Assigned To: Ben Cotton
Fedora Docs QA
http://docs.fedoraproject.org/en-US/F...
<rpm.ds object at 0xb77584b8>
: Documentation, EasyFix
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-13 14:13 EDT by Nathan Basanese
Modified: 2017-12-14 05:28 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
[vagrant@localhost ~]$ python --version Python 2.6.6 [vagrant@localhost ~]$ uname -a Linux localhost.localdomain 2.6.32-504.30.3.el6.i686 #1 SMP Wed Jul 15 10:55:56 UTC 2015 i686 i686 i386 GNU/Linux
Last Closed: 2017-12-14 05:28:05 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
This attachment is a screenshot of a more readable result. (80.63 KB, image/png)
2015-08-13 14:13 EDT, Nathan Basanese
no flags Details

  None (edit)
Description Nathan Basanese 2015-08-13 14:13:23 EDT
Created attachment 1062752 [details]
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]
Comment 1 Nathan Basanese 2015-08-13 14:18:02 EDT
Much of this documentation's out of date. 

I'm filing this bug to test the waters, and to see whether it's worth the time to file more.
Comment 2 Brian Exelbierd 2017-11-21 17:42:49 EST
(In reply to Nathan Basanese from comment #1)
> Much of this documentation's out of date. 
> 
> I'm filing this bug to test the waters, and to see whether it's worth the
> time to file more.

I realize it has been a while on this.  If you're interested in resurrecting the RPM guide and working on it, please contact me or docs@lists.fedoraproject.org and we will get you setup with an asciibinder repo to work against.
Comment 3 Petr Kovar 2017-11-22 03:05:14 EST
(In reply to Brian Exelbierd from comment #2)
> I realize it has been a while on this.  If you're interested in resurrecting
> the RPM guide and working on it, please contact me or
> docs@lists.fedoraproject.org and we will get you setup with an asciibinder
> repo to work against.

I'd suggest contributing to https://github.com/redhat-developer/rpm-packaging-guide/ instead, which is a guide with a similar scope and is being actively worked on.
Comment 4 Petr Kovar 2017-12-14 05:28:05 EST
The RPM Guide has been deprecated in favor of https://rpm-packaging-guide.github.io/.

Closing the issue here.

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