Merge lp:~tribaal/ubumirror/cdimage-normalisation into lp:ubumirror

Proposed by Chris Glass
Status: Merged
Merged at revision: 78
Proposed branch: lp:~tribaal/ubumirror/cdimage-normalisation
Merge into: lp:ubumirror
Diff against target: 71 lines (+17/-31)
2 files modified
ubucdimage (+17/-24)
ubumirror.conf (+0/-7)
To merge this branch: bzr merge lp:~tribaal/ubumirror/cdimage-normalisation
Reviewer Review Type Date Requested Status
Ubumirror Developers Pending
Review via email: mp+222470@code.launchpad.net

Description of the change

This makes the cdimage script behave like the others - sync everything by default and rely on the ocmmon blacklist ("exclude" parameters) to filter out content not to be synced.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubucdimage'
2--- ubucdimage 2014-06-08 05:58:41 +0000
3+++ ubucdimage 2014-06-09 07:26:27 +0000
4@@ -64,32 +64,25 @@
5
6 set +e
7
8-if [ -z "$UBUCDI_FLAVOURS" ]; then
9- echo Please define UBUCDI_FLAVOURS in /etc/ubumirror.conf
10- exit 1
11+echo "$(date -R): Initiating cdimage sync..."
12+
13+mkdir -p $UBUCDI_DIR
14+
15+rsync -av --partial \
16+ --timeout=$IO_TIMEOUT \
17+ --bwlimit=$SPEED \
18+ --exclude ".trace/${HOSTNAME}" \
19+ $UBUCDI_EXCLUDE \
20+ $UBUCDI_MIRROR $UBUCDI_DIR
21+
22+if [ $? -ne 0 ]; then
23+ ( echo "Sync for $FLAVOUR failed. Please check logs."; \
24+ egrep '^write failed|@ERROR' $LOGFILE ) | mail -s "Ubuntu cdimage sync failed" $EMAIL
25+ echo "$(date -R): sync for cdimage failed."
26+ exit 2
27 fi
28
29-for FLAVOUR in $UBUCDI_FLAVOURS; do
30- echo "$(date -R): Initiating sync for $FLAVOUR..."
31-
32- mkdir -p $UBUCDI_DIR/$FLAVOUR
33-
34- rsync -av --partial \
35- --timeout=$IO_TIMEOUT \
36- --bwlimit=$SPEED \
37- --exclude ".trace/${HOSTNAME}" \
38- $UBUCDI_EXCLUDE \
39- $UBUCDI_MIRROR/$FLAVOUR/current/ $UBUCDI_DIR/$FLAVOUR
40-
41- if [ $? -ne 0 ]; then
42- ( echo "Sync for $FLAVOUR failed. Please check logs."; \
43- egrep '^write failed|@ERROR' $LOGFILE ) | mail -s "Ubuntu cdimage $FLAVOUR sync failed" $EMAIL
44- echo "$(date -R): sync for $FLAVOUR failed."
45- exit 2
46- fi
47-
48- echo "$(date -R): sync for $FLAVOUR completed."
49-done
50+echo "$(date -R): sync for cdimage completed."
51
52 rm -f $LOCK > /dev/null 2>&1
53
54
55=== modified file 'ubumirror.conf'
56--- ubumirror.conf 2014-06-08 09:07:26 +0000
57+++ ubumirror.conf 2014-06-09 07:26:27 +0000
58@@ -42,13 +42,6 @@
59 UBUREL_MIRROR=rsync://rsync.releases.ubuntu.com/releases
60 UBUPOR_MIRROR=rsync://rsync.ports.ubuntu.com/ubuntu-ports
61
62-# UBUCDI_FLAVOURS is the set of image flavours to pull from UBICDI_MIRROR
63-# flavour names must match directory names on the mirror
64-UBUCDI_FLAVOURS="\
65- daily daily-live \
66- ubuntu-netbook/daily-live ubuntu-server/daily \
67-"
68-
69 # UBU{ARC,CDI,REL}_EXCLUDE is what things you want to exclude
70 UBUARC_EXCLUDE=""
71 # --exclude binary-powerpc/ --exclude binary-sparc/ \

Subscribers

People subscribed via source and target branches

to status/vote changes: