softwarefactory-project / rdopkg

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

rdopkg new-version interaction between patches_base and patches_ignore #97

Closed yazug closed 7 years ago

yazug commented 7 years ago

undesired behavior when running rdopkg new-version on a .spec file that has the following

# 
# patches_ignore=DROP-IN-RPM
# patches_base=X.Y.Z
# 

After rdopkg new-version X.Y.(Z+1)

# 
# patches_ignore=DROP-IN-RPM

and rdopkg aborts with

 Traceback (most recent call last):
  File "/usr/bin/rdopkg", line 9, in <module>
    load_entry_point('rdopkg==0.42', 'console_scripts', 'rdopkg')()
  File "/usr/lib/python2.7/site-packages/rdopkg/cli.py", line 46, in main
    sys.exit(rdopkg(*carg s))
  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 84, 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 208, in run_action
    return action_fun(*fun_args)
  File "/usr/lib/python2.7/site-packages/rdopkg/actions/distgit/actions.py", line 717, in update_patches
    raise exception.OnlyPatchesIgnoreUsed()
 rdopkg.exception.OnlyPatchesIgnoreUsed: update-patches attempted with only #patches_ignore magic comment in the spec file. Currently it is not safe to run update-patches without #patches_base specified AFTER #patches_ignore.

Expected behavior if patches_ignore is present and not empty string for it to also include patches_base=0 or X.Y.(Z+1) and for rdopkg new-version not to bomb out.

yac commented 7 years ago

Fix under review: https://review.rdoproject.org/r/#/c/4723/

yazug commented 7 years ago

Re-producer for major interaction bug

https://review.rdoproject.org/r/#/c/5444