Invalid version string {debupstream:packaging} with nest-part

Bug #2033318 reported by Adam Reviczky
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
git-build-recipe
New
Undecided
Unassigned

Bug Description

Using git recipe format 0.4 with {debupstream:packaging} of a nest-part which has debian/changelog in the branch gives an error:

HEAD is now at 991bf4ef7 2023.08.27 13:30
From https://git.launchpad.net/~reviczky/+git/context-debian
 * [new branch] master -> source-packaging/master
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/gitbuildrecipe/deb_util.py", line 155, in add_autobuild_changelog_entry
    changelog.Version(version)
  File "/usr/lib/python3/dist-packages/debian/debian_support.py", line 250, in __init__
    super(AptPkgVersion, self).__init__(version)
  File "/usr/lib/python3/dist-packages/debian/debian_support.py", line 133, in __init__
    self.full_version = version
  File "/usr/lib/python3/dist-packages/debian/debian_support.py", line 162, in __setattr__
    self._set_full_version(str(value))
  File "/usr/lib/python3/dist-packages/debian/debian_support.py", line 139, in _set_full_version
    raise ValueError("Invalid version string %r" % version)
ValueError: Invalid version string '{debupstream:packaging}.20230827+dfsg-1~ubuntu23.10.1'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/bin/git-build-recipe", line 11, in <module>
    load_entry_point('git-build-recipe==0.1', 'console_scripts', 'git-build-recipe')()
  File "/usr/lib/python3/dist-packages/gitbuildrecipe/main.py", line 144, in main
    add_autobuild_changelog_entry(
  File "/usr/lib/python3/dist-packages/gitbuildrecipe/deb_util.py", line 157, in add_autobuild_changelog_entry
    raise Exception("Invalid deb-version: %s: %s" % (version, e))
Exception: Invalid deb-version: {debupstream:packaging}.20230827+dfsg-1~ubuntu23.10.1: Invalid version string '{debupstream:packaging}.20230827+dfsg-1~ubuntu23.10.1'
RUN: /usr/share/launchpad-buildd/bin/in-target scan-for-processes --backend=chroot --series=mantic --arch=amd64 RECIPEBRANCHBUILD-3594804
Scanning for processes to kill in build RECIPEBRANCHBUILD-3594804

Launchpad recipe used:
# git-build-recipe format 0.4 deb-version {debupstream:packaging}.{date}+dfsg-1
lp:~reviczky/+git/context-texlive
nest texmf-dist lp:~reviczky/context/+git/master texmf-dist main
nest-part packaging lp:~reviczky/+git/context-debian debian debian master

Full log: https://launchpadlibrarian.net/683948138/buildlog.txt.gz

Tags: git recipe
Adam Reviczky (reviczky)
tags: added: git recipe
Colin Watson (cjwatson)
affects: launchpad → git-build-recipe
Revision history for this message
Colin Watson (cjwatson) wrote :

I believe https://paste.ubuntu.com/p/R9p8SFQsyK/ will fix this, but we need to work out why we missed this before and how to unit-test it properly.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.