[pbuilder] 02/02: modules: cross_build_setup(): run apt-get after enabling the foreign architecture in dpkg

Mattia Rizzolo mattia at debian.org
Sun Jan 15 16:15:24 UTC 2017


This is an automated email from the git hooks/post-receive script.

mattia pushed a commit to branch master
in repository pbuilder.

commit 9742ce7ab0521fe3df263a3e4557dac34052ac57
Author: Mattia Rizzolo <mattia at debian.org>
Date:   Sun Jan 15 17:15:11 2017 +0100

    modules: cross_build_setup(): run apt-get after enabling the foreign architecture in dpkg
    
    Otherwise apt won't know a thing about the foreign architectures, and won't be able to install anything
    
    Thanks: James Clarke <jrtc27 at jrtc27.com> for reporting
---
 pbuilder-buildpackage-funcs | 1 +
 pbuilder.8                  | 5 +++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/pbuilder-buildpackage-funcs b/pbuilder-buildpackage-funcs
index a4f1d1d..e771084 100644
--- a/pbuilder-buildpackage-funcs
+++ b/pbuilder-buildpackage-funcs
@@ -267,6 +267,7 @@ cross_build_setup () {
             exit 1
         fi
         $CHROOTEXEC dpkg --add-architecture "$HOST_ARCH"
+        $CHROOTEXEC apt-get -q "${APTGETOPT[@]}" update
         # preinstall libc-dev and libstdc++-dev 'cause https://bugs.debian.org/815172
         EXTRAPACKAGES="${EXTRAPACKAGES:+"$EXTRAPACKAGES" }crossbuild-essential-$HOST_ARCH libc-dev:$HOST_ARCH libstdc++-6-dev:$HOST_ARCH"
         DEBBUILDOPTS="${DEBBUILDOPTS:+"$DEBBUILDOPTS" }--host-arch $HOST_ARCH"
diff --git a/pbuilder.8 b/pbuilder.8
index 6a5e532..8ca5f13 100644
--- a/pbuilder.8
+++ b/pbuilder.8
@@ -251,8 +251,9 @@ to
 and
 .B DEB_BUILD_PROFILES
 in case of cross-building.  All the other configuration (adding the architecture
-to dpkg, installing the cross toolchain, passing --host-arch to dpkg-buildpackage,
-etc) is done nonetheless; specify this flag twice to prevent that from happening too.
+to dpkg, updating the apt cache, installing the cross toolchain, passing
+\-\-host\-arch to dpkg-buildpackage, etc) is done nonetheless; specify this
+flag twice to prevent that from happening too.
 
 .TP
 .BI "\-\-components [" "components" "]"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pbuilder/pbuilder.git



More information about the Pbuilder-maint mailing list