Bug 461443 - bodhi-client appears to be broken in various ways
bodhi-client appears to be broken in various ways
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: bodhi (Show other bugs)
9
All Linux
urgent Severity urgent
: ---
: ---
Assigned To: Luke Macken
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-07 22:52 EDT by Chris Weyl
Modified: 2018-04-11 05:07 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-10-12 22:06:06 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Chris Weyl 2008-09-07 22:52:21 EDT
Description of problem:
Latest stable F9 bodhi-client appears broken when used as directed by 'bodhi --help'

Version-Release number of selected component (if applicable):
bodhi-client-0.5.0-7.fc9.noarch

How reproducible:
Try to submit an update :)

Steps to Reproduce:

make commit tag build, as normal
make clog

then:

[cweyl@athena F-9]$ bodhi -n --file=clog -r F9 -t enhancement -R testing perl-SQL-Translator-0.09001-1.fc9
Traceback (most recent call last):
  File "/usr/bin/bodhi", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 2561, in <module>
    working_set.require(__requires__)
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 626, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 524, in resolve
    raise DistributionNotFound(req)  # XXX put more info here
pkg_resources.DistributionNotFound: bodhi==0.5.0

Actual results:
*boom*

Expected results:
Happy update creation.

Additional info:
I don't think I'm reading any of the bodhi help/man pages wrong; feel free to correct me if that's the case, however :)  This was working until this last update to the latest stable bodhi-client build.
Comment 1 Chris Weyl 2008-09-08 11:34:02 EDT
Resetting severity as this is impacting my ability to release updates.
Comment 2 Luke Macken 2008-09-08 14:02:32 EDT
Please try the latest bodhi and python-fedora from koji:

koji download-build bodhi-0.5.2-1.fc9
koji download-build python-fedora-0.3.5-1.fc10
Comment 3 Chris Weyl 2008-09-08 14:21:43 EDT
I note two different errors, now.

When updating just to bodhi-client-0.5.2-1.fc9, I get:

[cweyl@athena F-9]$ bodhi -n --file=clog -r F9 -t enhancement -R testing perl-SQL-Translator-0.09001-1.fc9
Traceback (most recent call last):
  File "/usr/bin/bodhi", line 313, in <module>
    main()
  File "/usr/bin/bodhi", line 136, in main
    if not update_args['type_']:
TypeError: string indices must be integers.

With both updated as per comment #2:

[cweyl@athena F-9]$ bodhi -n --file=clog -r F9 -t enhancement -R testing perl-SQL-Translator-0.09001-1.fc9
Traceback (most recent call last):
  File "/usr/bin/bodhi", line 313, in <module>
    main()
  File "/usr/bin/bodhi", line 134, in main
    updates = bodhi.parse_file(input_file=opts.input_file)
  File "/usr/lib/python2.5/site-packages/fedora/client/bodhi.py", line 268, in parse_file
    config.readfp(template_file)
  File "/usr/lib/python2.5/site-packages/iniparse/compat.py", line 106, in readfp
    self.data.readfp(fp)
  File "/usr/lib/python2.5/site-packages/iniparse/ini.py", line 501, in readfp
    raise MissingSectionHeaderError(fname, linecount, line)
ConfigParser.MissingSectionHeaderError: File contains no section headers.
file: clog, line: 1
'* Sun Sep 07 2008 Chris Weyl <cweyl@alumni.drew.edu> 0.9001-1\n'

This leads me to believe that in addition to the new error (choking on --file=clog), there is a packaging error in that bodhi-client has a dependency on a particular version of python-fedora and that dep is not expressed correctly by bodhi-client.
Comment 4 Luke Macken 2008-09-08 15:19:23 EDT
First off, make sure you update your the common module in CVS.  The Makefile.common contains updates needed for bodhi's new API.  Also, make sure you have python-fedora-0.3.5+ installed as well.
Comment 5 Chris Weyl 2008-09-08 15:42:11 EDT
I did update python-fedora as described in comment #2, but if bodhi-client depends on python-fedora >= 0.3.5 and it's not declared, then that's a packaging bug.  I've added this as bug 461518.


Updating Makefile.common didn't help.

[cweyl@athena perl-SQL-Translator]$ cvs update
? F-9/clog
? devel/.build-0.09001-1.fc10.log
? devel/SQL-Translator-0.09000.tar.gz
? devel/SQL-Translator-0.09001
? devel/noarch
? devel/perl-SQL-Translator-0.09001-1.fc10.src.rpm
cvs update: Updating .
cvs update: Updating F-7
cvs update: Updating F-8
M F-8/perl-SQL-Translator.spec
M F-8/sources
cvs update: Updating F-9
cvs update: Updating FC-6
cvs update: Updating common
P common/Makefile.common
cvs update: Updating devel
[cweyl@athena perl-SQL-Translator]$ cd F-9
[cweyl@athena F-9]$ bodhi -n --file=clog -r F9 -t enhancement -R testing perl-SQL-Translator-0.09001-1.fc9
Traceback (most recent call last):
  File "/usr/bin/bodhi", line 313, in <module>
    main()
  File "/usr/bin/bodhi", line 134, in main
    updates = bodhi.parse_file(input_file=opts.input_file)
  File "/usr/lib/python2.5/site-packages/fedora/client/bodhi.py", line 268, in parse_file
    config.readfp(template_file)
  File "/usr/lib/python2.5/site-packages/iniparse/compat.py", line 106, in readfp
    self.data.readfp(fp)
  File "/usr/lib/python2.5/site-packages/iniparse/ini.py", line 501, in readfp
    raise MissingSectionHeaderError(fname, linecount, line)
ConfigParser.MissingSectionHeaderError: File contains no section headers.
file: clog, line: 1
'* Sun Sep 07 2008 Chris Weyl <cweyl@alumni.drew.edu> 0.9001-1\n'
[cweyl@athena F-9]$ rpmquery bodhi-client python-fedora
bodhi-client-0.5.2-1.fc9.noarch
python-fedora-0.3.5-1.fc10.noarch
Comment 6 Luke Macken 2008-09-08 17:54:08 EDT
Oh, I didn't notice that you're feeding it the output of `make clog`.  You can do this one of two ways.  You can type `make update`, which will prompt you with a new update template; or, you can use the bodhi CLI like you were before, but omit the '--file=clog' argument.
Comment 7 Chris Weyl 2008-09-08 18:03:47 EDT
So...  Given that this was working before these latest updates, why isn't it accepting this input now?

Is this way depreciated, and another way provided to take a file as input?
Comment 8 Luke Macken 2008-09-08 18:56:56 EDT
The update template file parsing code has been recently rewritten.  Providing the `make clog` output has never been supported in the past.  The parser was most likely just silently failing previously.  The --file argument takes a new update template, in the form of what you see when you `make update`.
Comment 9 Luke Macken 2008-10-12 22:06:06 EDT
All of these issues should be resolved with the latest bodhi-client, python-fedora and Makefile.common.

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