Hi, On Sun, Oct 22, 2017 at 11:52:25AM +0200, Didier 'OdyX' Raboud wrote: > Package: git-buildpackage > Version: 0.9.0 > Severity: normal > File: gbp-dch > > On multiple of my repositories, `gbp dch` fails with the following error: > > (That's on https://anonscm.debian.org/cgit/pkg-games/planetblupi.git ) > > $ gbp dch --release --verbose > gbp:debug: ['git', 'rev-parse', '--show-cdup'] > gbp:debug: ['git', 'rev-parse', '--is-bare-repository'] > gbp:debug: ['git', 'rev-parse', '--git-dir'] > gbp:debug: ['git', 'symbolic-ref', 'HEAD'] > gbp:debug: ['git', 'show-ref', 'refs/heads/debian/master'] > gbp:debug: ['git', 'tag', '-l', 'debian/1.11.0-1'] > gbp:debug: ['git', 'rev-parse', '--quiet', '--verify', 'debian/1.11.0-1^0'] > gbp:debug: ['git', 'log', '--pretty=format:%H', > 'a1f72589d8e0285b65438bb924197a3dd5a93bb2..HEAD', '--no-merges', '--'] > gbp:debug: ['git', 'merge-base', 'HEAD', 'upstream/latest'] > gbp:debug: ['git', 'describe', '--match', 'upstream/*', '--abbrev=0', > 'e0ace8819512553d3680e912e419a5df1b8295ab'] > gbp:debug: Found upstream version None. > gbp:debug: /usr/bin/dpkg ['--compare-versions'] [None, 'lt', '1.11.0-1'] ^^^^ That's the problem and it results from the code around the above 'git describe' somehow returning None. From looking at the code and trying various things I can't reproduce this. Can you tell me where your HEAD was at when invoking the command?
git tag upstream/1.11.0 `git rev-parse v1.11.0` git tag -d upstream/1.11.0 gbp dch -R didn't do the trick. Any idea what I could be missing? > Traceback (most recent call last): > File "/usr/lib/python3/dist-packages/gbp/command_wrappers.py", line 232, in > call > ret = self.__call(args) > File "/usr/lib/python3/dist-packages/gbp/command_wrappers.py", line 125, in > __call > stderr=stderr_arg) > File "/usr/lib/python3.6/subprocess.py", line 709, in __init__ > restore_signals, start_new_session) > File "/usr/lib/python3.6/subprocess.py", line 1275, in _execute_child > restore_signals, start_new_session, preexec_fn) > TypeError: expected str, bytes or os.PathLike object, not NoneType > > During handling of the above exception, another exception occurred: > > Traceback (most recent call last): > File "/usr/bin/gbp", line 151, in <module> > sys.exit(supercommand()) > File "/usr/bin/gbp", line 147, in supercommand > return module.main(args) > File "/usr/lib/python3/dist-packages/gbp/scripts/dch.py", line 506, in main > options.upstream_branch, cp) > File "/usr/lib/python3/dist-packages/gbp/scripts/dch.py", line 52, in > guess_version_from_upstream > if compare_versions(version, cp.version) > 0: > File "/usr/lib/python3/dist-packages/gbp/deb/__init__.py", line 111, in > compare_versions > return DpkgCompareVersions()(version1, version2) > File "/usr/lib/python3/dist-packages/gbp/deb/__init__.py", line 66, in > __call__ > res = self.call([version1, 'lt', version2]) > File "/usr/lib/python3/dist-packages/gbp/command_wrappers.py", line 237, in > call > if ret and not quiet: > UnboundLocalError: local variable 'ret' referenced before assignment This one is fixed in git already. Cheers, -- Guido > > > > -- System Information: > Debian Release: buster/sid > APT prefers unstable-debug > APT policy: (500, 'unstable-debug'), (500, 'oldstable-proposed-updates'), > (500, 'unstable'), (500, 'testing'), (500, 'stable'), (100, 'experimental'), > (1, 'experimental-debug'), (1, 'buildd-unstable') > Architecture: amd64 (x86_64) > Foreign Architectures: i386 > > Kernel: Linux 4.13.0-1-amd64 (SMP w/4 CPU cores) > Locale: LANG=fr_CH.UTF-8, LC_CTYPE=fr_CH.UTF-8 (charmap=UTF-8), > LANGUAGE=fr_CH:fr (charmap=UTF-8) > Shell: /bin/sh linked to /bin/dash > Init: systemd (via /run/systemd/system) > > Versions of packages git-buildpackage depends on: > ii devscripts 2.17.10 > ii git 1:2.15.0~rc1-1 > ii man-db 2.7.6.1-2 > ii python3 3.6.3-1 > ii python3-dateutil 2.6.1-1 > ii python3-pkg-resources 36.2.7-2 > ii python3-six 1.11.0-1 > > Versions of packages git-buildpackage recommends: > ii cowbuilder 0.85 > ii pbuilder 0.228.9 > ii pristine-tar 1.42 > ii python3-requests 2.18.1-1 > > Versions of packages git-buildpackage suggests: > ii python3-notify2 0.3-3 > ii sudo 1.8.21p2-2 > ii unzip 6.0-21 > > -- no debconf information >

