1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
#!/bin/bash -e
# this is part of langpack-o-matic
#
# (C) 2014-2015 Canonical Ltd.
# Author: Martin Pitt <martin.pitt@canonical.com>
#
# Build update packages for the release given as first argument; stable-updates
# will be uploaded to PPA, devel release will be uploaded straight into the
# Ubuntu archive.
release="$1"
[ -n "$release" ] || {
echo "Usage: $0 <release>" >&2
exit 1
}
unset LANG
cd $(dirname $0)
if test -s updated-packages; then
echo "updated-packages is nonzero, please clean up first" >&2
exit 1
fi
# download the overlay full, vivid full and vivid delta tarballs and merge them together
TAR=ubuntu-rtm-${release%-*}-translations.tar.gz
TARVF=ubuntu-vivid-translations.tar.gz
TARVD=ubuntu-vivid-translations-update.tar.gz
TARM=ubuntu-rtm-${release%-*}-translations-merged.tar.gz # merged tarball output
rm -f $TAR $TARVF $TARVD $TARM
wget --no-check-certificate -q -O $TAR https://translations.launchpad.net/ubuntu-rtm/${release%-*}/+latest-full-language-pack
wget --no-check-certificate -q -O $TARVF https://translations.launchpad.net/ubuntu/vivid/+latest-full-language-pack
wget --no-check-certificate -q -O $TARVD https://translations.launchpad.net/ubuntu/vivid/+latest-delta-language-pack
test -e $TAR -a -e $TARVF -a -e $TARVD || {
echo "Could not download one of the tarballs" >&2
exit 1
}
# merge the tarballs to $TARM
./merge-tarballs $TARVF $TARVD $TAR $TARM
dir=../${release/updates/proposed}
if [ -d $dir ]; then
rm -rf ${dir}.prev
mv ${dir} ${dir}.prev
fi
mkdir -p ${dir} ../logs
./import --distribution=ubuntu-rtm -v --class touch --pkglist maps/pkglist-touch-${release%-*} --treshold=70 --min-priority=1500 $TARM ${release/updates/proposed} $dir > ../logs/${release}-touch.log 2>&1
if [ "${release%-updates}" = "$release" ]; then
# development release, upload straight to archive
target="rtm"
else
echo "Uploads to -updates are not currently implemented" >&2
exit 1
fi
# work-around the ubuntu-rtm/15.04 hacks by changing the changelog release to vivid
find $dir/sources-touch -name changelog -exec sed -i 's/ 15.04;/ vivid;/' "{}" \;
LANG= schroot -p -c langpack `pwd`/packages upload $target > ../logs/rtm-$release-upload.log 2>&1
rm -f $TAR $TARVF $TARVD $TARM
# request full export the next time
lib/lp-request-full-export.py ubuntu-rtm 15.04
|