#943616 devscripts: debuild does not realise --build=source means .changes will be named _source.changes

Package:
devscripts
Source:
devscripts
Description:
scripts to make the life of a Debian Package maintainer easier
Submitter:
Russell Stuart
Date:
2021-02-03 09:33:03 UTC
Severity:
normal
#943616#5
Date:
2019-10-27 11:11:27 UTC
From:
To:
Running this:

   debuild --preserve-env --preserve-envvar=PATH -k0xF5231C62E7843A8C '-mRussell Stuart <russell-debian@stuart.id.au>' -sa --build=source --lintian-opts --info --display-info --display-experimental

gets me the error:

   debuild: fatal error at line 1062:
   can't open pam-python_1.0.6-1.1+deb9u1_amd64.changes for reading: No such file or directory

If you replace --build=source with -S it works.
--- /etc/devscripts.conf ---
--- ~/.devscripts --- Not present
#943616#12
Date:
2020-09-08 10:10:01 UTC
From:
To:
I can confirm this. And I'd say it deserves a more important Severity,
the behaviour doesn't match what it's documented.

I can also confirm dpkg-buildpackage {--build=source,-S} work both as
expected.

Cheers,

#943616#17
Date:
2021-02-03 09:05:30 UTC
From:
To:
I also see this bug when debuild is invoked by gbp buildpackage.

gbp buildpackage --git-verbose --git-ignore-branch --git-ignore-new
--git-export-dir=~/tmp --build=source --no-check-builddeps -us -uc

gbp:info: Moving '/home/brownn/tmp/systemd-tmp' to
'/home/brownn/tmp/systemd-247.2'
gbp:debug: ['git', 'show', '--pretty=medium', 'HEAD:debian/source/format']
gbp:debug: ['git', 'show', '--pretty=medium', 'HEAD:debian/source/format']
gbp:debug: ['git', 'show-ref', '--verify', 'refs/heads/pristine-tar']
gbp:debug: ['git', 'show-ref', '--verify',
'refs/remotes/origin/pristine-tar']
gbp:debug: ['git', 'log', '--pretty=format:%H', '--no-merges',
'--grep=pristine-tar .* systemd_247.2\\.orig.tar\\.',
'origin/pristine-tar', '--']
gbp:debug: Found pristine-tar commit at
'f016606a8f492d404ea61ce909d9c19c2155007f'
gbp:debug: ['git', 'rev-parse', '--quiet', '--verify',
'f016606a8f492d404ea61ce909d9c19c2155007f^0']
gbp:debug: ['git', 'show',
'--pretty=format:%an%x00%ae%x00%ad%x00%cn%x00%ce%x00%cd%x00%s%x00%f%x00%b%x00',
'-z', '--date=raw', '--no-renames', '--name-status', '--no-show-signature',
'f016606a8f492d404ea61ce909d9c19c2155007f']
gbp:debug: Determined compression type 'gzip'
gbp:debug: ['git', 'show', '--pretty=medium', 'HEAD:debian/source/format']
gbp:debug: ['git', 'show-ref', '--verify', 'refs/heads/pristine-tar']
gbp:warning: Pristine-tar branch "pristine-tar" not found
gbp:debug: ['git', 'show', '--pretty=medium', 'HEAD:debian/source/format']
gbp:info: Creating /home/brownn/tmp/systemd_247.2.orig.tar.gz
gbp:debug: ['git', 'show', '--pretty=medium', 'HEAD:debian/source/format']
gbp:debug: upstream signature state: auto
gbp:debug: ['git', 'show-ref', '--verify', 'refs/heads/pristine-tar']
gbp:debug: ['git', 'show-ref', '--verify', 'refs/heads/pristine-tar']
gbp:debug: pristine-tar [] ['checkout',
'/home/brownn/tmp/systemd_247.2.orig.tar.gz']
gbp:debug: pristine-tar [] ['--help']
gbp:debug: pristine-tar [] ['verify',
'/home/brownn/tmp/systemd_247.2.orig.tar.gz']
gbp:info: Performing the build
gbp:debug: debuild -i -I ['--build=source', '--no-check-builddeps', '-us',
'-uc'] []
 dpkg-buildpackage -us -uc -ui -i -I --build=source --build=source
--no-check-builddeps

<snip>

debuild: fatal error at line 1062:
can't open systemd_247.2-5_amd64.changes for reading: No such file or
directory
gbp:error: 'debuild -i -I --build=source --no-check-builddeps -us -uc'
failed: it exited with 29