Ubuntu Pastebin

Paste from Tiago Stürmer Daitx at Mon, 10 Aug 2015 11:01:50 +0000

Download as text
 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
--- go.orig	2015-08-10 07:52:36.377209324 -0300
+++ go	2015-08-10 08:01:07.228226893 -0300
@@ -11,12 +11,15 @@
 # Don't use ben's download scripts - need to merge proposed and release
 MIRROR=/srv/transitions/mirror/ubuntu/dists
 SERIES=wily
+COMPONENTS="main universe multiverse restricted"
+
+TMPDIR=$(mktemp -d)
 
 for arch in i386 amd64 armhf arm64 powerpc ppc64el; do
-    OUTPUT=Packages_${arch}
+    OUTPUT="${TMPDIR}/Packages_${arch}"
     [ -e $OUTPUT ] && rm $OUTPUT
     for series in $SERIES-proposed $SERIES; do
-        for component in main universe multiverse restricted; do
+        for component in $COMPONENTS; do
             zcat ${MIRROR}/${series}/${component}/binary-${arch}/Packages.gz \
                 >> $OUTPUT
         done
@@ -25,11 +28,17 @@
 
 [ -e Sources ] && rm Sources
 for series in $SERIES-proposed $SERIES; do
-    for component in main universe multiverse restricted; do
+    for component in $COMPONENTS; do
 	zcat ${MIRROR}/${series}/${component}/source/Sources.gz >> Sources
     done
 done
 
+python3 filter-old-binaries.py Sources $(ls $TMPDIR/*)
+
+# cleanup (should be a function and called in a trap if running bash)
+rm -f $TMPDIR/*
+rmdir $TMPDIR
+
 rm -rf html text
 
 ben tracker --quiet --update
Download as text