]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
scripts/build_utils.sh: add lang=none option to sources.list 1137/head
authorKefu Chai <kchai@redhat.com>
Fri, 28 Sep 2018 03:15:01 +0000 (11:15 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 28 Sep 2018 03:34:28 +0000 (11:34 +0800)
some mirrors do not contains the package description translations. when
apt tries to download the packages descriptions, it fails like:

E: Failed to fetch
http://mirror.yandex.ru/mirrors/launchpad/ubuntu-toolchain-r/dists/xenial/main/i18n/Translation-en
404  Not Found [IP: 213.180.204.183 80]
E: Some index files failed to download. They have been ignored, or old
ones used instead.

for more info, see sources.list(5) and apt.conf(5). the default value
of "lang" is set by Acquire::Languages, which is in turn "en" and
"environment" by default. we need to override them with "none".

Fixes #1136
Signed-off-by: Kefu Chai <kchai@redhat.com>
scripts/build_utils.sh

index 4ed4dea87c0cb7e05033042d3446b6cd3e167bb7..b0bef7f26fb4b458039e897f3f614dce332eb450 100644 (file)
@@ -534,20 +534,20 @@ setup_pbuilder_for_new_gcc() {
     # in test repo.
     if [ "$ARCH" = "arm64" ]; then
         cat > $hookdir/D05install-gcc-7 <<EOF
-echo "deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu $DIST main" >> \
+echo "deb [lang=none] http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu $DIST main" >> \
   /etc/apt/sources.list.d/ubuntu-toolchain-r.list
-echo "deb http://ports.ubuntu.com/ubuntu-ports $DIST-updates main" >> \
+echo "deb [lang=none] http://ports.ubuntu.com/ubuntu-ports $DIST-updates main" >> \
   /etc/apt/sources.list.d/ubuntu-toolchain-r.list
 EOF
     elif [ "$ARCH" = "x86_64" ]; then
         cat > $hookdir/D05install-gcc-7 <<EOF
-echo "deb http://security.ubuntu.com/ubuntu $DIST-security main" >> \
+echo "deb [lang=none] http://security.ubuntu.com/ubuntu $DIST-security main" >> \
   /etc/apt/sources.list.d/ubuntu-toolchain-r.list
-echo "deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu $DIST main" >> \
+echo "deb [lang=none] http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu $DIST main" >> \
   /etc/apt/sources.list.d/ubuntu-toolchain-r.list
-echo "deb [arch=amd64] http://mirror.cs.uchicago.edu/ubuntu-toolchain-r $DIST main" >> \
+echo "deb [arch=amd64 lang=none] http://mirror.cs.uchicago.edu/ubuntu-toolchain-r $DIST main" >> \
   /etc/apt/sources.list.d/ubuntu-toolchain-r.list
-echo "deb [arch=amd64,i386] http://mirror.yandex.ru/mirrors/launchpad/ubuntu-toolchain-r $DIST main" >> \
+echo "deb [arch=amd64,i386 lang=none] http://mirror.yandex.ru/mirrors/launchpad/ubuntu-toolchain-r $DIST main" >> \
   /etc/apt/sources.list.d/ubuntu-toolchain-r.list
 EOF
     else