#1020322 devscripts: current directory rename by dch makes build fail

Package:
devscripts
Source:
devscripts
Description:
scripts to make the life of a Debian Package maintainer easier
Submitter:
Vincent Lefevre
Date:
2022-09-20 01:27:04 UTC
Severity:
important
Tags:
#1020322#5
Date:
2022-09-20 01:22:07 UTC
From:
To:
The use of dch may rename the current directory:

  If  the directory name of the source tree has the form package-version,
  then debchange will also attempt to rename it if the (upstream) version
  number  changes.  This can be prevented by using the --preserve command
  line or configuration file option as described below.

This is documented, but this is silly as it can make builds fail:

zira:/tmp> apt source console-setup
[...]
zira:/tmp> cd ./console-setup-1.210
zira:...nsole-setup-1.210> dch -l +local foo
dch warning: your current directory has been renamed to:
../console-setup-1.210+local1
zira:...nsole-setup-1.210> debuild -i -us -uc -b
[...]
/tmp/console-setup-1.210+local1/Fonts/bdf2psf: /tmp/console-setup-1.210: No such file or directory
/tmp/console-setup-1.210+local1/Fonts/bdf2psf: /tmp/console-setup-1.210: No such file or directory
/tmp/console-setup-1.210+local1/Fonts/bdf2psf: /tmp/console-setup-1.210: No such file or directory
make: *** [Fonts/Makefile:338: /tmp/console-setup-1.210+local1/Fonts/Arabic-Fixed15.psf] Error 2
make: *** Waiting for unfinished jobs....
make: *** [Fonts/Makefile:338: /tmp/console-setup-1.210+local1/Fonts/Arabic-Fixed16.psf] Error 2
/tmp/console-setup-1.210+local1/Fonts/bdf2psf: /tmp/console-setup-1.210: No such file or directory
/tmp/console-setup-1.210+local1/Fonts/bdf2psf: /tmp/console-setup-1.210: No such file or directory
make: *** [Fonts/Makefile:338: /tmp/console-setup-1.210+local1/Fonts/Arabic-VGA14.psf] Error 2
make: *** [Fonts/Makefile:342: /tmp/console-setup-1.210+local1/Fonts/Arabic-VGA28x16.psf] Error 2
make: *** [Fonts/Makefile:338: /tmp/console-setup-1.210+local1/Fonts/Arabic-VGA16.psf] Error 2
/tmp/console-setup-1.210+local1/Fonts/bdf2psf: /tmp/console-setup-1.210: No such file or directory
make: *** [Fonts/Makefile:342: /tmp/console-setup-1.210+local1/Fonts/Arabic-VGA32x16.psf] Error 2
/tmp/console-setup-1.210+local1/Fonts/bdf2psf: /tmp/console-setup-1.210: No such file or directory
make: *** [Fonts/Makefile:338: /tmp/console-setup-1.210+local1/Fonts/Armenian-Fixed13.psf] Error 2
/tmp/console-setup-1.210+local1/Fonts/bdf2psf: /tmp/console-setup-1.210: No such file or directory
make: *** [Fonts/Makefile:338: /tmp/console-setup-1.210+local1/Fonts/Arabic-VGA8.psf] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
debuild: fatal error at line 1182:
dpkg-buildpackage -us -uc -ui -i -b failed
--- /etc/devscripts.conf ---
Empty.
--- ~/.devscripts --- Not present