Skip to content

Commit

Permalink
apt: Fix build error in lucid chroot
Browse files Browse the repository at this point in the history
We can drop this change when we decide to drop lucid support.

See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=642031#22
  • Loading branch information
okkez committed Jan 27, 2014
1 parent 5bc70e3 commit f894a6e
Showing 1 changed file with 32 additions and 2 deletions.
34 changes: 32 additions & 2 deletions package/apt/build-in-chroot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,22 @@ build_chroot()
architecture=$1
code_name=$2

run_sudo debootstrap --arch $architecture $code_name $base_dir
case $code_name in
lucid)
case $architecture in
i386)
machine=i386
;;
amd64)
machine=x86_64
;;
esac
run_sudo setarch $machine --uname-2.6 debootstrap --arch $architecture $code_name $base_dir http://jp.archive.ubuntu.com/ubuntu
;;
*)
run_sudo debootstrap --arch $architecture $code_name $base_dir
;;
esac

case $code_name in
squeeze|wheezy|jessie|unstable)
Expand Down Expand Up @@ -123,7 +138,22 @@ build()
run cp ${script_base_dir}/build-deb.sh \
${CHROOT_BASE}/$target/tmp/
run_sudo rm -rf $build_dir
run_sudo su -c "/usr/sbin/chroot ${CHROOT_BASE}/$target /tmp/build-deb.sh"
case $code_name in
lucid)
case $architecture in
i386)
machine=i386
;;
amd64)
machine=x86_64
;;
esac
run_sudo su -c "setarch $machine --uname-2.6 /usr/sbin/chroot ${CHROOT_BASE}/$target /tmp/build-deb.sh"
;;
*)
run_sudo su -c "/usr/sbin/chroot ${CHROOT_BASE}/$target /tmp/build-deb.sh"
;;
esac
run mkdir -p $pool_dir
run echo 'Options +Indexes' > ${script_base_dir}/${distribution}/.htaccess
for path in $build_dir/*; do
Expand Down

0 comments on commit f894a6e

Please sign in to comment.