#1145335 debrebuild: mmdebstrap builder passes env-var count as a command

Package:
devscripts
Source:
devscripts
Description:
scripts to make the life of a Debian Package maintainer easier
Submitter:
Serge Schneider
Date:
2026-08-24 09:49:02 UTC
Severity:
normal
#1145335#5
Date:
2026-08-24 09:46:37 UTC
From:
To:
Dear Maintainer,

The refactor of the mmdebstrap builder that closed #1140552 introduced
another issue. It now makes all debrebuild --builder=mmdebstrap commands
fail if anything is set in the Environment section.

The trailing string concatenation forces `map` into scalar context, in
which it returns the count of elements. For a buildinfo with N Environment
lines the customize-hook becomes `env --chdir=<path> N dpkg-buildpackage
...`, and env fails with `env: 'N': No such file or directory`.

It's reproducible by running the following:

  $ curl -sfLO
https://buildinfos.debian.net/buildinfo-pool/h/hello/hello_2.12.3-1_amd64.buildinfo
  $ debrebuild --builder=mmdebstrap --buildresult=./out
hello_2.12.3-1_amd64.buildinfo
  [...]
  I: running --chrooted-customize-hook in shell: sh -c 'env
--chdir=/build/reproducible-path/hello-2.12.3 5 dpkg-buildpackage -uc -a
amd64 --build=any'
  env: '5': No such file or directory
  E: command failed: env --chdir=/build/reproducible-path/hello-2.12.3 5
dpkg-buildpackage -uc -a amd64 --build=any

I've attached a patch that resolves the problem for me.

Kind regards,

Serge
--- /etc/devscripts.conf --- Empty.
--- ~/.devscripts --- Not present