5 Script to re-build entire archive from one release for another.
7 Often usecase -- rebuilding for a new Ubuntu brew every 6 months.
12 nd_rebuildarchive old_release new_release
16 nd_rebuildarchive natty oneiric
27 # some NeuroDebian variables hardcoded in for now
28 repo_server=neuro.debian.net
32 repo_distspath=$repo_toppath/$repo_urlpath/dists
36 list_file="$old_dist-$dist.list"
37 summary_file="$old_dist-$dist.summary"
39 [ -e "$list_file" ] || \
40 ssh -l $repo_user $repo_server cat $repo_distspath/$old_dist/*/source/Sources.gz \
41 | zgrep -e '^\(Package\|Directory\| [a-z0-9]\{32\} [0-9]* \S*.dsc$\)' \
42 | sed -e 's,.* \([^ ][^ ]*\)$,\1,g' | tr '\n' ' '| sed -e 's,\.dsc,.dsc\n,g' \
47 dist_id=$(nd_querycfg "release backport ids" "$dist")
49 | while read name topdir dscfile; do
50 echo "I: Forwardporting for $dist_id $dscfile"
53 || dget -d http://$repo_server/$repo_urlpath/$topdir/$dscfile || {
54 echo -e "E: $dscfile\t\tFAILED to fetch" >> $summary_file
59 bpdscfile=$(/home/neurodebian/neurodebian/tools/backport-dsc \
60 --target-distribution "$dist" \
61 --no-maintainer-update \
62 --version-prefix "+" \
63 --version-suffix "$dist_id" \
64 "$dscfile" | tail -n1 | sed -e 's/^.* //g')
66 echo " I: Building backported dscfile: $bpdscfile"
68 $CMD sudo nd_build $family $dist $bpdscfile && {
69 echo -e "I: $bpdscfile\t\tOk" >> $summary_file
71 echo -e "E: $bpdscfile\t\tFAILED to build" >> $summary_file