Skip to content

Commit

Permalink
Add chroot workaround for debian builds as well
Browse files Browse the repository at this point in the history
Ubuntu 14.10 ships with the broken chroot...
  • Loading branch information
mlschroe committed Nov 11, 2014
1 parent efc0f50 commit 8eb0052
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions build-pkg-deb
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ pkg_set_packageid_deb() {
pkg_install_deb() {
export DEBIAN_FRONTEND=noninteractive
export DEBIAN_PRIORITY=critical
( chroot $BUILD_ROOT dpkg --install --force all .init_b_cache/$PKG.deb 2>&1 || touch $BUILD_ROOT/exit ) | \
perl -ne '$|=1;/^(Configuration file|Installing new config file|Selecting previously deselected|Selecting previously unselected|\(Reading database|Unpacking |Setting up|Creating config file|Preparing to replace dpkg)/||/^$/||print'
( cd $BUILD_ROOT && chroot $BUILD_ROOT dpkg --install --force all .init_b_cache/$PKG.deb 2>&1 || touch $BUILD_ROOT/exit ) | \
perl -ne '$|=1;/^(Configuration file|Installing new config file|Selecting previously deselected|Selecting previously unselected|\(Reading database|Unpacking |Setting up|Creating config file|Preparing to replace dpkg|Preparing to unpack )/||/^$/||print'
check_exit
# ugly workaround for upstart system. some packages (procps) try
# to start a service in their configure phase. As we don't have
Expand Down Expand Up @@ -117,12 +117,12 @@ pkg_runscripts_deb() {
fi
if test -e "$BUILD_ROOT/.init_b_cache/scripts/$PKG.pre" ; then
echo "running $PKG preinstall script"
chroot $BUILD_ROOT ".init_b_cache/scripts/$PKG.pre" install < /dev/null
(cd $BUILD_ROOT && chroot $BUILD_ROOT ".init_b_cache/scripts/$PKG.pre" install < /dev/null )
rm -f "$BUILD_ROOT/.init_b_cache/scripts/$PKG.pre"
fi
if test -e "$BUILD_ROOT/.init_b_cache/scripts/$PKG.post" ; then
echo "running $PKG postinstall script"
chroot $BUILD_ROOT ".init_b_cache/scripts/$PKG.post" configure '' < /dev/null
(cd $BUILD_ROOT && chroot $BUILD_ROOT ".init_b_cache/scripts/$PKG.post" configure '' < /dev/null )
rm -f "$BUILD_ROOT/.init_b_cache/scripts/$PKG.post"
fi
}

0 comments on commit 8eb0052

Please sign in to comment.