/[qa]/trunk/pts/www/bin/update_incoming.sh
ViewVC logotype

Contents of /trunk/pts/www/bin/update_incoming.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2230 - (show annotations) (download) (as text)
Wed Jul 22 13:31:17 2009 UTC (3 years, 10 months ago) by zack
File MIME type: application/x-sh
File size: 5713 byte(s)
add support for showing translation (l10n) status
(Closes: #206363)
1 #!/bin/sh
2
3 # Copyright: © 2002-2008 Raphaël Hertzog
4 # Copyright: © 2007-2009 Stefano Zacchiroli <zack@debian.org>
5
6 # This file is distributed under the terms of the General Public License
7 # version 2 or (at your option) any later version.
8
9 #mirror="http://gluck.debian.org/debian"
10 mirror="http://ftp.us.debian.org/debian"
11 security="http://security.debian.org"
12 volatile="http://volatile.debian.org"
13 piuparts="http://piuparts.debian.org"
14
15 official_distros="oldstable stable testing unstable experimental"
16 pu_distros="stable-proposed-updates testing-proposed-updates"
17 security_distros="oldstable stable"
18
19 umask 002
20 set -e
21
22 if [ -d "../incoming" ]; then
23 root=$PWD/..
24 elif [ -d "incoming" ]; then
25 root=$PWD
26 else
27 root=/org/packages.qa.debian.org/www
28 fi
29
30 cd $root/incoming
31
32 nice_wget() {
33 # $1: url
34 # $2: filename
35 # For timestamping to work, copy to .new (not link, wget will not break
36 # the link)
37 cp -a $2 $2.new || true
38 # Beware that -N conflicts with -O (#88176, #202911)
39 if wget -U pts -q -O $2.new "$1" ; then
40 mv $2.new $2
41 else
42 echo "Downloading $1 failed, $2 is stale now"
43 rm -f $2.new
44 fi
45 }
46
47 http_head() {
48 # $1: url
49 # return 0 if the URL exists (HEAD was OK), non-0 otherwise
50 curl --head --fail --silent "$1" > /dev/null
51 return $?
52 }
53
54 nice_redirect_to() {
55 # $1 : target file
56 # $2-... : shell command
57 dest="$1"
58 shift
59 if [ -f "$dest" ] ; then
60 mv "$dest" "$dest.bak"
61 fi
62 $* > "$dest" || (echo "Failure while executing $* . Continuing ..." ; cp "$dest.bak" "$dest")
63 }
64
65 # Download all Sources.gz
66 for comp in main contrib non-free
67 do
68 for dist in $official_distros ; do
69 nice_wget $mirror/dists/$dist/$comp/source/Sources.gz \
70 Sources-${dist}_$comp.gz
71 done
72 for dist in $pu_distros ; do
73 nice_wget $mirror/dists/$dist/$comp/source/Sources.gz \
74 Sources-${dist}_$comp.gz
75 done
76 for dist in $security_distros ; do
77 nice_wget $security/dists/$dist/updates/$comp/source/Sources.gz \
78 Sources-security-${dist}_$comp.gz
79 done
80 nice_wget $volatile/debian-volatile/dists/stable/volatile/$comp/source/Sources.gz \
81 Sources-volatile_$comp.gz
82 done
83
84 # Download mentors.d.n Sources
85 for comp in main contrib non-free
86 do
87 nice_wget http://mentors.debian.net/debian/dists/unstable/$comp/source/Sources.gz \
88 Sources-mentors_$comp.gz
89 done
90
91 # Download update_excuses.html
92 nice_wget http://ftp-master.debian.org/testing/update_excuses.html.gz \
93 update_excuses.html.gz
94
95 # Download PTS subscription count
96 nice_wget http://packages.qa.debian.org/data/pts-subscription-count.txt \
97 count.txt
98
99 # Download override disparities
100 nice_wget http://qa.debian.org/data/ftp/override-disparities.unstable \
101 override-disparities.unstable
102 nice_wget http://qa.debian.org/data/ftp/override-disparities.experimental \
103 override-disparities.experimental
104
105 # Download lintian.d.o run info
106 #nice_wget http://lintian.debian.org/lintian.log lintian.log
107 nice_wget http://lintian.debian.org/qa-list.txt lintian.qa-list.txt
108
109 # Download bugs summary
110 nice_wget http://merkel.debian.org/~hertzog/pts/bugs.txt bugs.txt
111 nice_wget http://qa.debian.org/data/ddpo/results/bugs.txt bugs-src.txt
112 nice_wget http://qa.debian.org/data/bts/sources sources
113 # Temporary measure because merkel is fucked
114 #nice_wget http://www.wolffelaar.nl/~jeroen/pts.bugs.txt bugs.txt
115 #cp /org/bugs.debian.org/etc/indices/sources ./
116 cut -f1,3 sources >sources.map.new
117 touch -r sources sources.map.new
118 mv sources.map.new sources.map
119 nice_redirect_to bugs.help.txt $root/bin/tagged_bugs.py "help"
120 nice_redirect_to bugs.gift.txt \
121 $root/bin/tagged_bugs.py "gift" "debian-qa@lists.debian.org"
122 piuparts_distros="sid"
123 for distro in $piuparts_distros ; do
124 nice_wget $piuparts/$distro/sources.txt piuparts-$distro.txt
125 done
126
127 # Download debcheck lists
128 DCROOT=http://qa.debian.org/data/debcheck/result
129 nice_wget $DCROOT/oldstable/lists/ALL-pkglist debcheck-oldstable
130 nice_wget $DCROOT/stable/lists/ALL-pkglist debcheck-stable
131 nice_wget $DCROOT/testing/lists/ALL-pkglist debcheck-testing
132 nice_wget $DCROOT/unstable/lists/ALL-pkglist debcheck-unstable
133
134 # Download the translation status of packages
135 nice_wget http://i18n.debian.net/l10n-pkg-status/pkglist l10n-status.txt
136
137 # Get wnpp information
138 nice_wget http://qa.debian.org/data/bts/wnpp_rm wnpp_rm
139
140 # get patches from ubuntu
141 nice_wget http://patches.ubuntu.com/PATCHES patches.ubuntu
142 # get packages version in Ubuntu (preprocessed by Lucas on merkel)
143 nice_wget http://qa.debian.org/~lucas/ubuntu/sources-versions.txt \
144 versions.ubuntu
145 # get bugs in Ubuntu (preprocessed by Lucas on merkel)
146 nice_wget http://qa.debian.org/~lucas/ubuntu/ubuntu-bugs.txt bugs.ubuntu
147
148 # download LowThresholdNmu list
149 nice_wget 'http://wiki.debian.org/LowThresholdNmu?action=raw' \
150 low_threshold_nmu.txt
151
152 # ongoing transitions
153 nice_wget http://ftp-master.debian.org/transitions.yaml \
154 transitions.yaml
155
156 # download the list of packages indexed by svnbuildstat
157 nice_wget http://svnbuildstat.debian.net/packages/flatlist \
158 svnbuildstat_list.txt
159
160 # download DEHS (http://dehs.alioth.debian.org)
161 nice_wget http://dehs.alioth.debian.org/no_updated.txt \
162 dehs_out_of_date.txt
163 nice_wget http://dehs.alioth.debian.org/no_upstream.txt \
164 dehs_error.txt
165
166 # download NEW queue info
167 nice_wget http://ftp-master.debian.org/new.822 new.822
168
169 # retrieve package descriptions from UDD
170 #nice_redirect_to shortdesc.txt $root/bin/retrieve_shortdesc.sh
171 nice_wget http://master.debian.org/~zack/pts/shortdesc.txt shortdesc.txt
172
173 # What more ?
174
175 # Decompress all files
176 for file in *.gz; do
177 gzip -d -c $file > ${file%%.gz}.new
178 touch -r $file ${file%%.gz}.new
179 mv ${file%%.gz}.new ${file%%.gz}
180 done
181
182 # vim: ts=8

Properties

Name Value
svn:eol-style native
svn:executable *
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.5