update bandersnatch to 3.1.2

This commit is contained in:
bigeagle 2018-12-04 17:28:21 +08:00
parent 685af6e17b
commit b3d8d30945
2 changed files with 10 additions and 6 deletions

View File

@ -1,4 +1,4 @@
FROM debian:stretch FROM python:3-stretch
MAINTAINER Justin Wong <yuzhi.wang@tuna.tsinghua.edu.cn> MAINTAINER Justin Wong <yuzhi.wang@tuna.tsinghua.edu.cn>
RUN echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ stretch main contrib non-free" > /etc/apt/sources.list && \ RUN echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ stretch main contrib non-free" > /etc/apt/sources.list && \
@ -7,16 +7,16 @@ RUN echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ stretch main contrib n
echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian-security/ stretch/updates main contrib non-free" >> /etc/apt/sources.list echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian-security/ stretch/updates main contrib non-free" >> /etc/apt/sources.list
RUN apt-get update && \ RUN apt-get update && \
apt-get install -y wget curl rsync lftp git jq python-dev python-pip yum-utils createrepo python3-dev python3-pip aria2 apt-get install -y wget curl rsync lftp git jq python-dev python-pip yum-utils createrepo aria2
RUN pip3 install bandersnatch==2.2.1 RUN pip3 install bandersnatch==3.1.2
RUN STATIC_DEPS=true pip3 install pyquery
RUN pip3 install requests pyyaml RUN pip3 install requests pyyaml
RUN mkdir -p /home/tunasync-scripts RUN mkdir -p /home/tunasync-scripts
ADD https://storage.googleapis.com/git-repo-downloads/repo /usr/local/bin/aosp-repo ADD https://storage.googleapis.com/git-repo-downloads/repo /usr/local/bin/aosp-repo
RUN chmod a+x /usr/local/bin/aosp-repo RUN chmod a+x /usr/local/bin/aosp-repo
RUN apt-get install -y python3-lxml && pip3 install pyquery
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && apt-get install -y locales -qq && locale-gen RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && apt-get install -y locales -qq && locale-gen
ENV LANG=en_US.UTF-8 ENV LANG=en_US.UTF-8

View File

@ -16,12 +16,14 @@ if [[ $INIT == "0" ]]; then
[mirror] [mirror]
directory = ${TUNASYNC_WORKING_DIR} directory = ${TUNASYNC_WORKING_DIR}
master = ${TUNASYNC_UPSTREAM} master = ${TUNASYNC_UPSTREAM}
json = true
timeout = 15 timeout = 15
workers = 10 workers = 10
stop-on-error = true hash-index = false
stop-on-error = false
delete-packages = true delete-packages = true
EOF EOF
/usr/bin/timeout -s INT 7200 $BANDERSNATCH -c $CONF mirror /usr/bin/timeout -s INT 36000 $BANDERSNATCH -c $CONF mirror
if [[ $? == 124 ]]; then if [[ $? == 124 ]]; then
echo 'Sync timeout (/_\\)' echo 'Sync timeout (/_\\)'
exit 1 exit 1
@ -31,8 +33,10 @@ else
[mirror] [mirror]
directory = ${TUNASYNC_WORKING_DIR} directory = ${TUNASYNC_WORKING_DIR}
master = ${TUNASYNC_UPSTREAM} master = ${TUNASYNC_UPSTREAM}
json = true
timeout = 15 timeout = 15
workers = 10 workers = 10
hash-index = false
stop-on-error = false stop-on-error = false
delete-packages = false delete-packages = false
EOF EOF