packit / dist-git-to-source-git

Converting dist-git to source-git
MIT License
4 stars 9 forks source link

Fails for packages with missing or empty prep section #46

Open dhodovsk opened 4 years ago

dhodovsk commented 4 years ago

Packages:

Convert log:

[dhodovsk@shiny playground]$ podman run --rm -v $PWD:/workdir:z dist2src dist2src -vv convert rpms/appstream-data:c8s src/appstream-data:c8s
convert(origin='rpms/appstream-data:c8s', dest='src/appstream-data:c8s')
Running command get_sources.sh in /workdir/rpms/appstream-data
output = Retrieving https://git.centos.org/sources/appstream-data/c8s/c01fab7926a0fd4f2b1196600b5dd1b2ad4b5425
Retrieving https://git.centos.org/sources/appstream-data/c8s/6b08557071ff73d81cc4a4bbab5908ef3e21238f
Retrieving https://git.centos.org/sources/appstream-data/c8s/d22ded3cd4471c1db4835f7cdf01a4b8317f69f1
Retrieving https://git.centos.org/sources/appstream-data/c8s/811c4fe5e36dde125dfb0d3a48a6fc9dce80192c

Running rpmbuild in /workdir/rpms/appstream-data
Traceback (most recent call last):
  File "/usr/local/bin/dist2src", line 11, in <module>
    load_entry_point('dist-git-to-source-git==0.1.dev123+gc102801.d20200903', 'console_scripts', 'dist2src')()
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/dist2src/cli.py", line 82, in wrapper
    ret = func(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/click/decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/dist2src/cli.py", line 208, in convert
    d2s.convert(origin_branch, dest_branch)
  File "/usr/local/lib/python3.6/site-packages/dist2src/core.py", line 302, in convert
    self.run_prep()
  File "/usr/local/lib/python3.6/site-packages/dist2src/core.py", line 258, in run_prep
    self._enforce_autosetup()
  File "/usr/local/lib/python3.6/site-packages/dist2src/core.py", line 220, in _enforce_autosetup
    for i, line in enumerate(prep_lines):
TypeError: 'NoneType' object is not iterable
TomasTomecek commented 4 years ago

Yeah, just ran into this - funny.

Well, since we rely on %[auto]setup to unpack the tarball and create a git repo we'd need to do those ourselves.

sentry-io[bot] commented 3 years ago

Sentry issue: DIST2SRC-UPDATE-1Q