Merge lp:~sil2100/langpack-o-matic/new_overlay_cron into lp:langpack-o-matic

Proposed by Łukasz Zemczak on 2015-09-23
Status: Merged
Merged at revision: 546
Proposed branch: lp:~sil2100/langpack-o-matic/new_overlay_cron
Merge into: lp:langpack-o-matic
Prerequisite: lp:~sil2100/langpack-o-matic/multi_merge
Diff against target: 63 lines (+20/-8)
1 file modified
cron.daily.rtm (+20/-8)
To merge this branch: bzr merge lp:~sil2100/langpack-o-matic/new_overlay_cron
Reviewer Review Type Date Requested Status
Martin Pitt (community) 2015-09-23 Approve on 2015-09-23
Review via email: mp+272111@code.launchpad.net

Commit Message

Modify the cron.daily.rtm script to do the right things for touch overlay langpack creation.

Description of the Change

Modify the cron.daily.rtm script to do the right things for touch overlay langpack creation.

Requires the multi_merge branch to land as well.

To post a comment you must log in.
546. By Łukasz Zemczak on 2015-09-23

Remove debugging leftovers.

Martin Pitt (pitti) wrote :

Thanks! Looks fine to me, except for one bug.

review: Needs Fixing
Łukasz Zemczak (sil2100) wrote :

One more revision needs to be pushed here, testing it right now.

547. By Łukasz Zemczak on 2015-09-23

Fix problem with missing translations by changing merge order.

Łukasz Zemczak (sil2100) wrote :

Now the merge is good for review once again!

Martin Pitt (pitti) wrote :

Thanks, looks good! I merged this and ran it once on macquarie, so let's double-check the new langpacks in the PPA tomorrow.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'cron.daily.rtm'
2--- cron.daily.rtm 2015-08-18 13:21:23 +0000
3+++ cron.daily.rtm 2015-09-23 19:52:47 +0000
4@@ -2,7 +2,7 @@
5
6 # this is part of langpack-o-matic
7 #
8-# (C) 2014 Canonical Ltd.
9+# (C) 2014-2015 Canonical Ltd.
10 # Author: Martin Pitt <martin.pitt@canonical.com>
11 #
12 # Build update packages for the release given as first argument; stable-updates
13@@ -24,22 +24,31 @@
14 exit 1
15 fi
16
17+# download the overlay full, vivid full and vivid delta tarballs and merge them together
18 TAR=ubuntu-rtm-${release%-*}-translations.tar.gz
19-rm -f $TAR
20+TARVF=ubuntu-vivid-translations.tar.gz
21+TARVD=ubuntu-vivid-translations-update.tar.gz
22+TARM=ubuntu-rtm-${release%-*}-translations-merged.tar.gz # merged tarball output
23+rm -f $TAR $TARVF $TARVD $TARM
24 wget --no-check-certificate -q -O $TAR https://translations.launchpad.net/ubuntu-rtm/${release%-*}/+latest-full-language-pack
25-test -e $TAR || {
26- echo "Could not download $TAR" >&2
27+wget --no-check-certificate -q -O $TARVF https://translations.launchpad.net/ubuntu/vivid/+latest-full-language-pack
28+wget --no-check-certificate -q -O $TARVD https://translations.launchpad.net/ubuntu/vivid/+latest-delta-language-pack
29+
30+test -e $TAR -a -e $TARVF -a -e $TARVD || {
31+ echo "Could not download one of the tarballs" >&2
32 exit 1
33 }
34
35+# merge the tarballs to $TARM
36+./merge-tarballs $TARVF $TARVD $TAR $TARM
37+
38 dir=../${release/updates/proposed}
39 if [ -d $dir ]; then
40 rm -rf ${dir}.prev
41- mv ${dir} ${dir}.prev
42+ mv ${dir} ${dir}.prev
43 fi
44 mkdir -p ${dir}
45-./import --distribution=ubuntu-rtm -v --class touch --pkglist maps/pkglist-touch-${release%-*} --treshold=70 --min-priority=1500 $TAR ${release/updates/proposed} $dir > ../logs/${release}-touch.log 2>&1
46-NO_CHANGELOG=1 ./merge-touch-upstream-translations ../${release/updates/proposed}/sources-touch >> ../logs/${release}-touch.log 2>&1
47+./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
48
49 if [ "${release%-updates}" = "$release" ]; then
50 # development release, upload straight to archive
51@@ -49,8 +58,11 @@
52 exit 1
53 fi
54
55+# work-around the ubuntu-rtm/15.04 hacks by changing the changelog release to vivid
56+find $dir/sources-touch -name changelog -exec sed -i 's/ 15.04;/ vivid;/' "{}" \;
57+
58 LANG= schroot -p -c langpack /srv/language-packs.ubuntu.com/langpack-o-matic/packages upload $target > ../logs/rtm-$release-upload.log 2>&1
59-rm $TAR
60+rm -f $TAR $TARVF $TARVD $TARM
61
62 # request full export the next time
63 lib/lp-request-full-export.py ubuntu-rtm 15.04

Subscribers

People subscribed via source and target branches