softwarefactory-project / rdopkg

power to the packagers
Apache License 2.0
28 stars 21 forks source link

get_source_urls fails on Fedora 30 #183

Closed ktdreyer closed 3 years ago

ktdreyer commented 4 years ago

I'm running rdopkg new-version on python-sphinx-removed-in in order to resolve rhbz#1697060

[kdreyer@carbon python-sphinx-removed-in]$ rdopkg new-version
Latest version detected from upstream/master: 0.2.0
Patches branch 'patches/master-patches' not found. Running in --bump-only mode.
Traceback (most recent call last):
  File "/usr/bin/rdopkg", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python3.7/site-packages/rdopkg/cli.py", line 49, in main
    sys.exit(rdopkg(*cargs))
  File "/usr/lib/python3.7/site-packages/rdopkg/cli.py", line 41, in rdopkg
    version=__version__)
  File "/usr/lib/python3.7/site-packages/rdopkg/shell.py", line 87, in run
    action_runner.engage()
  File "/usr/lib/python3.7/site-packages/rdopkg/core.py", line 212, in engage
    new_args = self.action_manager.run_action(step, self.args)
  File "/usr/lib/python3.7/site-packages/rdopkg/action.py", line 252, in run_action
    return action_fun(*fun_args)
  File "/usr/lib/python3.7/site-packages/rdopkg/actions/distgit/actions.py", line 720, in get_source
    source_urls = specfile.Spec().get_source_urls()
  File "/usr/lib/python3.7/site-packages/rdopkg/utils/specfile.py", line 642, in get_source_urls
    if len(sources) == 0:
TypeError: object of type 'filter' has no len()
ktdreyer commented 4 years ago

I don't see any unit tests for get_source_urls. We need to add some before touching this method :(

jcapiitao commented 4 years ago

Hi @ktdreyer Thank you for opening this issue. I tried to reproduce it in my f30 environment with the last rdopkg release (1.1.1), but it went well. I think this should have been resolved with this change. Could you give more details about your environment to be able to reproduce the issue please ?

apevec commented 3 years ago

worksforme