/[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 1953 - (show annotations) (download) (as text)
Mon Aug 11 18:45:08 2008 UTC (4 years, 9 months ago) by zack
File MIME type: application/x-sh
File size: 5210 byte(s)
minor reorganization of update_incoming logics

- enforce the convention that all Sources file are called
  Sources-DISTRO_COMPONENT, instead of having mixture of '-', '_', and whatsnot
- factorize retrieval code removing several copy/pasted lines to retrieve
  Sources
1 #!/bin/sh
2
3 # Copyright 2002-2008 Raphaƫl Hertzog
4 # Copyright 2007-2008 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
14 official_distros="oldstable stable testing unstable experimental"
15 pu_distros="stable-proposed-updates testing-proposed-updates"
16 security_distros="oldstable stable"
17
18 umask 002
19 set -e
20
21 if [ -d "../incoming" ]; then
22 root=$PWD/..
23 elif [ -d "incoming" ]; then
24 root=$PWD
25 else
26 root=/org/packages.qa.debian.org/www
27 fi
28
29 cd $root/incoming
30
31 nice_wget() {
32 # $1: url
33 # $2: filename
34 # For timestamping to work, copy to .new (not link, wget will not break
35 # the link)
36 cp -a $2 $2.new || true
37 # Beware that -N conflicts with -O (#88176, #202911)
38 if wget -U pts -q -O $2.new $1 ; then
39 mv $2.new $2
40 else
41 echo "Downloading $1 failed, $2 is stale now"
42 rm -f $2.new
43 fi
44 }
45
46 nice_redirect_to() {
47 # $1 : target file
48 # $2-... : shell command
49 dest="$1"
50 shift
51 if [ -f "$dest" ] ; then
52 mv "$dest" "$dest.bak"
53 fi
54 $* > "$dest" || (echo "Failure while executing $* . Continuing ..." ; cp "$dest.bak" "$dest")
55 }
56
57 # Download all Sources.gz
58 for comp in main contrib non-free
59 do
60 for dist in $official_distros ; do
61 nice_wget $mirror/dists/$dist/$comp/source/Sources.gz \
62 Sources-${dist}_$comp.gz
63 done
64 for dist in $pu_distros ; do
65 nice_wget $mirror/dists/$dist/$comp/source/Sources.gz \
66 Sources-${dist}_$comp.gz
67 done
68 for dist in $security_distros ; do
69 nice_wget $security/dists/$dist/updates/$comp/source/Sources.gz \
70 Sources-security-${dist}_$comp.gz
71 done
72 nice_wget $volatile/debian-volatile/dists/stable/volatile/$comp/source/Sources.gz \
73 Sources-volatile_$comp.gz
74 done
75
76 # Download mentors.d.n Sources
77 for comp in main contrib non-free
78 do
79 nice_wget http://mentors.debian.net/debian/dists/unstable/$comp/source/Sources.gz \
80 Sources-mentors_$comp.gz
81 done
82
83 # Download update_excuses.html
84 nice_wget http://ftp-master.debian.org/testing/update_excuses.html.gz \
85 update_excuses.html.gz
86
87 # Download PTS subscription count
88 nice_wget http://packages.qa.debian.org/data/pts-subscription-count.txt \
89 count.txt
90
91 # Download override disparities
92 nice_wget http://qa.debian.org/data/ftp/override-disparities.unstable \
93 override-disparities.unstable
94 nice_wget http://qa.debian.org/data/ftp/override-disparities.experimental \
95 override-disparities.experimental
96
97 # Download lintian.d.o run info
98 #nice_wget http://lintian.debian.org/lintian.log lintian.log
99 nice_wget http://lintian.debian.org/qa-list.txt lintian.qa-list.txt
100
101 # Download bugs summary
102 nice_wget http://merkel.debian.org/~hertzog/pts/bugs.txt bugs.txt
103 nice_wget http://qa.debian.org/data/ddpo/results/bugs.txt bugs-src.txt
104 nice_wget http://qa.debian.org/data/bts/sources sources
105 # Temporary measure because merkel is fucked
106 #nice_wget http://www.wolffelaar.nl/~jeroen/pts.bugs.txt bugs.txt
107 #cp /org/bugs.debian.org/etc/indices/sources ./
108 cut -f1,3 sources >sources.map.new
109 touch -r sources sources.map.new
110 mv sources.map.new sources.map
111 nice_redirect_to bugs.help.txt $root/bin/tagged_bugs.py "help"
112 nice_redirect_to bugs.gift.txt \
113 $root/bin/tagged_bugs.py "gift" "debian-qa@lists.debian.org"
114
115 # Download debcheck lists
116 DCROOT=http://qa.debian.org/data/debcheck/result
117 nice_wget $DCROOT/stable/lists/ALL-pkglist debcheck-stable
118 nice_wget $DCROOT/testing/lists/ALL-pkglist debcheck-testing
119 nice_wget $DCROOT/unstable/lists/ALL-pkglist debcheck-unstable
120
121 # Download the list of packages with debconf templates
122 # DISABLED until ddtp.debian.org is back up
123 #nice_wget http://ddtp.debian.org/cgi-bin/debconf_list.cgi debconf-list
124
125 # Get wnpp information
126 nice_wget http://qa.debian.org/data/bts/wnpp_rm wnpp_rm
127
128 # get patches from ubuntu
129 nice_wget http://patches.ubuntu.com/PATCHES patches.ubuntu
130 # get packages version in Ubuntu (preprocessed by Lucas on merkel)
131 nice_wget http://qa.debian.org/~lucas/ubuntu/sources-versions.txt \
132 versions.ubuntu
133 # get bugs in Ubuntu (preprocessed by Lucas on merkel)
134 nice_wget http://qa.debian.org/~lucas/ubuntu/ubuntu-bugs.txt bugs.ubuntu
135
136 # download LowThresholdNmu list
137 nice_wget 'http://wiki.debian.org/LowThresholdNmu?action=raw' \
138 low_threshold_nmu.txt
139
140 # ongoing transitions
141 nice_wget http://ftp-master.debian.org/transitions.yaml \
142 transitions.yaml
143
144 # download the list of packages indexed by svnbuildstat
145 nice_wget http://svnbuildstat.debian.net/packages/flatlist \
146 svnbuildstat_list.txt
147
148 # download DEHS (http://dehs.alioth.debian.org)
149 nice_wget http://dehs.alioth.debian.org/no_updated.txt \
150 dehs_out_of_date.txt
151 nice_wget http://dehs.alioth.debian.org/no_upstream.txt \
152 dehs_error.txt
153
154 # retrieve package descriptions from UDD
155 nice_redirect_to shortdesc.txt $root/bin/retrieve_shortdesc.sh
156
157 # What more ?
158
159 # Decompress all files
160 for file in *.gz; do
161 gzip -d -c $file > ${file%%.gz}.new
162 touch -r $file ${file%%.gz}.new
163 mv ${file%%.gz}.new ${file%%.gz}
164 done
165
166 # 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