Package: dpkg-dev Version: 1.18.24 Severity: wishlist Dear Maintainer,
I'm trying to run a build of Debian's vim package, but limiting it to a couple of variants, to reduce the build time. The debian/rules file allows you to set the VARIANT variable on the commandline to the variants you want, but communicating a variable with a value containing a space to the makefile via dpkg-buildpackage isn't possible, as far as I can tell. What does work is dpkg-buildpackage -b --no-sign -R"debian/rules VARIANT=vim-nox" Though perhaps I'm abusing the -R option here a bit, as there's no explicit way to pass non-target arguments to dpkg-buildpackage (and perhaps that's the real request here). What does not work is dpkg-buildpackage -b --no-sign -R"debian/rules VARIANT='vim-nox vim-tiny'" It complains that there's no "vim-tiny'" target. The output from the program shows what I'd expect: debian/rules VARIANT='vim-nox vim-tiny' clean but an exerpt from strace shows why it's not working: execve("debian/rules", ["debian/rules", "VARIANT='vim-nox", "vim-tiny'", "clean"], [/* 48 vars */]) = 0 Because dpkg-buildpackage is doing a simple whitespace split on the value passed to -R, instead of a more sophisticated, shell-oriented parsing, there's basically no way of passing this variable on in this fashion. I see that there's a Text::ParseWords::shell::shellwords function that seems like it might be an appropriate tool for this, but perhaps as I suggested above, what's really needed here is a way to pass other arguments to the execution of rules. -- System Information: Debian Release: 9.4 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 4.9.0-6-amd64 (SMP w/1 CPU core) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages dpkg-dev depends on: ii binutils 2.28-5 ii bzip2 1.0.6-8.1 ii libdpkg-perl 1.18.24 ii make 4.1-9.1 ii patch 2.7.5-1+b2 ii perl 5.24.1-3+deb9u4 ii tar 1.29b-1.1 ii xz-utils 5.2.2-1.2+b1 Versions of packages dpkg-dev recommends: ii build-essential 12.3 ii clang-3.8 [c-compiler] 1:3.8.1-24 ii fakeroot 1.21-3.1 ii gcc [c-compiler] 4:6.3.0-4 ii gcc-6 [c-compiler] 6.3.0-18+deb9u1 ii gnupg 2.1.18-8~deb9u2 ii gnupg2 2.1.18-8~deb9u2 ii gpgv 2.1.18-8~deb9u2 ii libalgorithm-merge-perl 0.08-3 Versions of packages dpkg-dev suggests: pn debian-keyring <none> -- no debconf information