[Python-modules-team] Bug#797726: stdeb: "py2dsc-deb --no-pythonX-scripts=True" exits with error due to wrong indent in patch

Anthony Fok foka at debian.org
Wed Sep 2 01:22:58 UTC 2015


Source: stdeb
Version: 0.8.5-1
Severity: important
Tags: patch

When called with --no-python2-scripts=True and/or --no-python3-scripts=True,
py2dsc-deb stops with error and fails to generate a deb package.  For example:

    $ pypi-download python-ly
    OK: python-ly-0.9.2.tar.gz

    $ py2dsc-deb --no-python2-scripts=True python-ly-0.9.2.tar.gz
    ...
    dpkg-buildpackage: source changed by Anthony Fok <foka at debian.org>
     dpkg-source --before-build python-ly-0.9.2
     fakeroot debian/rules clean
    debian/rules:10: *** missing separator (did you mean TAB instead of 8
spaces?).  Stop.
    dpkg-buildpackage: error: fakeroot debian/rules clean gave error exit
status 2
    Traceback (most recent call last):
      File "setup.py", line 68, in <module>
        classifiers = classifiers,
      File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
        dist.run_commands()
      File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "/usr/lib/python2.7/dist-packages/stdeb/command/sdist_dsc.py", line
140, in run
        remove_expanded_source_dir=self.remove_expanded_source_dir,
      File "/usr/lib/python2.7/dist-packages/stdeb/util.py", line 1397, in
build_dsc
        dpkg_genchanges(cwd=fullpath_repackaged_dirname)
      File "/usr/lib/python2.7/dist-packages/stdeb/util.py", line 538, in
dpkg_genchanges
        process_command(args,cwd=cwd)
      File "/usr/lib/python2.7/dist-packages/stdeb/util.py", line 183, in
process_command
        check_call(args, cwd=cwd)
      File "/usr/lib/python2.7/dist-packages/stdeb/util.py", line 46, in
check_call
        raise CalledProcessError(retcode)
    stdeb.util.CalledProcessError: 2
    ERROR running: /usr/bin/python setup.py --command-packages stdeb.command
sdist_dsc --dist-dir=/tmp/deb_dist --use-premade-distfile=/tmp/python-
ly-0.9.2.tar.gz --no-python2-scripts=True bdist_deb
ERROR in deb_dist/tmp_py2dsc/python-ly-0.9.2
    $

It turns out that, with --no-pythonX-scripts=True, the following snippet
is added to debian/rules:

    override_dh_auto_install:
        dh_auto_install
            rm -rf debian/python-python-ly/trash

where the "dh_auto_install" line is indented with 4 spaces instead of a TAB,
leading to the error.  Attached is a suggested patch to fix the incorrect
indentation in stdeb-0.8.5/debian/patches/use_pybuild_buildsystem.patch

Cheers,
Anthony



-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.1.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_CA.utf8, LC_CTYPE=en_CA.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-indent-in-use_pybuild_buildsystem_patch.diff
Type: text/x-diff
Size: 522 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/python-modules-team/attachments/20150901/0140c4e5/attachment.diff>


More information about the Python-modules-team mailing list