Package: pbuilder
Version: 0.213+nmu1
Severity: normal
Tags: patch

Dear Maintainer,

when building packages with USE_PDEBUILD_INTERNAL='yes', ccache remains
unused. This is because the PATH environment variable is not preserved
when switching to the pbuser user. Attached patch works for me.

Greetings

-- System Information:
Debian Release: 7.1
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages pbuilder depends on:
ii  cdebootstrap           0.5.9
ii  coreutils              8.13-3.5
ii  debconf [debconf-2.0]  1.5.49
ii  debianutils            4.3.2
ii  debootstrap            1.0.48+deb7u1
ii  dpkg-dev               1.16.10
ii  wget                   1.13.4-3

Versions of packages pbuilder recommends:
ii  devscripts  2.12.6
ii  fakeroot    1.18.4-2
ii  sudo        1.8.5p2-1+nmu1

Versions of packages pbuilder suggests:
ii  cowdancer     0.70
pn  gdebi-core    <none>
pn  pbuilder-uml  <none>

-- debconf information:
  pbuilder/mirrorsite: http://ftp.de.debian.org/debian
  pbuilder/nomirror:
  pbuilder/rewrite: false
diff --git a/pdebuild-internal b/pdebuild-internal
index 0c4fb99..7056464 100644
--- a/pdebuild-internal
+++ b/pdebuild-internal
@@ -121,7 +121,7 @@ executehooks "A"
 # do build with that user.
 # $DEBBUILDOPTS is evaluated inside the su and chroot.
 export DEBBUILDOPTS
-CMD="/usr/bin/dpkg-buildpackage -rfakeroot -us -uc "'${DEBBUILDOPTS}'
+CMD="env PATH=$PATH /usr/bin/dpkg-buildpackage -rfakeroot -us -uc "'${DEBBUILDOPTS}'
 echo "I: Running $CMD"
 # This command should be ran with current directory as bind-mounted
 # package source directory

Reply via email to