git-pbuilder builds in a chroot, containing build-essential and the
build dependencies. (One reason for doing this is to have _only_ those
packages available, and not anything else you happen to have installed,
as a check that the declared build dependencies do include everything
needed.)
However, before entering the chroot, it tries to run debian/rules clean
*outside* the chroot; in some cases the clean step needs some of the
build dependencies, so this can fail.
I'm not sure if this should be considered a bug, but this is what I use
to turn it off:
--- a/usr/bin/pdebuild
+++ b/usr/bin/pdebuild
@@ -85,9 +85,9 @@ else
# eval is needed to reverse that.
SOURCE_OPTIONS=$(get_source_options)
eval dpkg-source ${SOURCE_OPTIONS} --before-build .
- if should_clean_source; then
- "${BUILDSOURCEROOTCMD}" debian/rules clean
- fi
+ #if should_clean_source; then
+ # "${BUILDSOURCEROOTCMD}" debian/rules clean
+ #fi
eval dpkg-source ${SOURCE_OPTIONS} -b .
if ! [ "../${DSC}" -ef "${BUILDRESULT}/${DSC}" ]; then
log.i "Generating source changes file for original dsc"