[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#955620: cloud-init - debian/rules clean fails from git repo



On Fri, Apr 03, 2020 at 03:54:34PM +0200, Bastian Blank wrote:
> Currently running debian/rules clean from git repository fails:
> 
> |  % ./debian/rules clean
> | py3versions: no X-Python3-Version in control file, using supported versions
> | dh clean --with python3,systemd --buildsystem pybuild
> |    dh_auto_clean -O--buildsystem=pybuild
> | I: pybuild base:217: python3.7 setup.py clean
> | Traceback (most recent call last):
> |   File "setup.py", line 293, in <module>
> |     version=get_version(),
> |   File "setup.py", line 85, in get_version
> |     (ver, _e) = tiny_p(cmd)
> |   File "setup.py", line 50, in tiny_p
> |     (cmd, ret, out, err))
> | RuntimeError: Failed running ['/usr/bin/python3.7', 'tools/read-version'] [rc=1] (, git describe version (0.7.9-145-g12042ee9) differs from cloudinit.version (20.1)
> | Please get the latest upstream tags.
> | As an example, this can be done with the following:
> | $ git remote add upstream https://git.launchpad.net/cloud-init
> | $ git fetch upstream --tags
> | )
> | E: pybuild pybuild:352: clean: plugin distutils failed with: exit code=1: python3.7 setup.py clean
> | dh_auto_clean: error: pybuild --clean --test-nose -i python{version} -p "3.7 3.8" returned exit code 13
> | make: *** [debian/rules:7: clean] Error 13

This is only the case if the debian patches aren't applied; we apply
debian/patches/0009-Drop-all-unused-extended-version-handling.patch to
remove all the git parsing from the tools/read-version command.  So I'm
not sure this is actually a bug.  Is there anywhere that we actually
depend on the ability to run 'debian/rules clean' on an unpatched source
tree?

As an alternative, we could defer to the upstream Makefile's 'clean'
target and skip the pybuild clean process.

noah


Reply to: