]> git.proxmox.com Git - rustc.git/commitdiff
debian: Fix issue seen with sudo pbuilder
authorJordan Justen <jljusten@gmail.com>
Sun, 18 Jan 2015 09:01:45 +0000 (01:01 -0800)
committerJordan Justen <jljusten@gmail.com>
Mon, 19 Jan 2015 18:20:47 +0000 (10:20 -0800)
sudo pbuilder caused SUDO_USER to be set during the
build. mk/install.mk will then try to run sudo, but since sudo is not
a build-dep, this will fail.

Signed-off-by: Jordan Justen <jljusten@gmail.com>
debian/rules

index 901c762da20ab62306c4a46a911afa2e20b91fa5..b3cabd75ed099aa598151948179ddfc6ed1c0e95 100755 (executable)
@@ -4,6 +4,11 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
+# When using sudo pbuilder, this will cause mk/install.mk to run sudo,
+# but we don't need sudo as a build-dep for the package if we unexport
+# the SUDO_USER variable.
+unexport SUDO_USER
+
 RUST_VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ' | cut -f 1 -d '-' | cut -f 1-2 -d .)
 RUST_PREFIX := usr/lib/$(DEB_HOST_MULTIARCH)/rust/$(RUST_VERSION)
 DEB_DESTDIR := $(CURDIR)/debian/rust