softwarefactory-project / rdopkg

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

ValueError: need more than 1 value to unpack on self.txt.split("%changelog\n") #126

Closed ssbarnea closed 7 years ago

ssbarnea commented 7 years ago
git commit -a -m Updated patches from foobar-6.0-patches
## update_spec
## commit_distgit_update
Traceback (most recent call last):
  File "/usr/bin/rdopkg", line 9, in <module>
    load_entry_point('rdopkg==0.43', 'console_scripts', 'rdopkg')()
  File "/usr/lib/python2.7/site-packages/rdopkg/cli.py", line 46, in main
    sys.exit(rdopkg(*cargs))
  File "/usr/lib/python2.7/site-packages/rdopkg/cli.py", line 38, in rdopkg
    return shell.run(runner, cargs=cargs, version=VERSION)
  File "/usr/lib/python2.7/site-packages/rdopkg/shell.py", line 89, in run
    action_runner.engage()
  File "/usr/lib/python2.7/site-packages/rdopkg/core.py", line 194, in engage
    new_args = self.action_manager.run_action(step, self.args)
  File "/usr/lib/python2.7/site-packages/rdopkg/action.py", line 209, in run_action
    return action_fun(*fun_args)
  File "/usr/lib/python2.7/site-packages/rdopkg/actions/distgit/actions.py", line 677, in commit_distgit_update
    msg = _commit_message()
  File "/usr/lib/python2.7/site-packages/rdopkg/actions/distgit/actions.py", line 657, in _commit_message
    _, changes = specfile.Spec().get_last_changelog_entry(strip=True)
  File "/usr/lib/python2.7/site-packages/rdopkg/utils/specfile.py", line 541, in get_last_changelog_entry
    _, changelog = self.txt.split("%changelog\n")
ValueError: need more than 1 value to unpack
ssbarnea commented 7 years ago

@yac I raised a CR for fixing it at https://softwarefactory-project.io/r/#/c/8828/

yazug commented 7 years ago

.spec file has different case for changelog than the code is looking for.

335:%changeLog

If this is not the edge case for above issue can you provide copy of .spec or where I can look at it for pattern so we can add it to unittests?