pbuilder git tree: Changes to 'master'

Loïc Minier lool at dooz.org
Sun Dec 13 10:22:54 UTC 2009


On Sun, Dec 13, 2009, Junichi Uekawa wrote:
> I wonder if this will change the behavior of spaces inside
> command-line options, such as dpkg-buildpackage with debbuildopts set.

 If you look at how the previous version was handling it:
-    echo  "${DPKG_COMMANDLINE}" | $CHROOTEXEC $SUTOUSER
+    echo  "cd tmp/buildd/*/ && ${DPKG_COMMANDLINE}${TWICE:+ && ${DPKG_COMMANDLINE}}" | $CHROOTEXEC $SUTOUSER

 it was doing a single expansion of the DPKG_COMMANDLINE var outside of
 the chroot, which was then expanded again when run in the chroot; the
 new version just passes this twice, so I don't think it matters.

 I then changed the way it's built as follows:
-    echo  "cd tmp/buildd/*/ && ${DPKG_COMMANDLINE}${TWICE:+ && ${DPKG_COMMANDLINE}}" | $CHROOTEXEC $SUTOUSER
+    if [ -n "$TWICE" ]; then
+        DPKG_COMMANDLINE="$DPKG_COMMANDLINE && $DPKG_COMMANDLINE"
+    fi
+    DPKG_COMMANDLINE="cd tmp/buildd/*/ && $DPKG_COMMANDLINE"
+    log "I: Running $DPKG_COMMANDLINE"
+    echo "$DPKG_COMMANDLINE" | $CHROOTEXEC $SUTOUSER

 which doens't change the number of expansions, so I think it's ok.

-- 
Loïc Minier



More information about the Pbuilder-maint mailing list