[Collab-qa-commits] r2078 - rc-buggy-leaf-packages

Alexander Reichle-Schmehl tolimar at alioth.debian.org
Wed Nov 9 10:15:09 UTC 2011


Author: tolimar
Date: 2011-11-09 10:15:08 +0000 (Wed, 09 Nov 2011)
New Revision: 2078

Modified:
   rc-buggy-leaf-packages/get-rcbuggy-leaf-packages
Log:
Add some comments



Modified: rc-buggy-leaf-packages/get-rcbuggy-leaf-packages
===================================================================
--- rc-buggy-leaf-packages/get-rcbuggy-leaf-packages	2011-11-09 10:00:49 UTC (rev 2077)
+++ rc-buggy-leaf-packages/get-rcbuggy-leaf-packages	2011-11-09 10:15:08 UTC (rev 2078)
@@ -5,17 +5,33 @@
 
 SOURCE_RCBUGS=$(mktemp)
 
+# First we create a list of source packages and the number of their open rc
+# bugs
 /usr/bin/psql -h localhost -p 5441 -U guest -f source-rcbugs.sql udd --tuples-only --no-align --field-separator=\  > $SOURCE_RCBUGS
 
 SOURCE_RCBUGS_BUILDS=$(mktemp)
 
+# then we add the list of the binary packages build by these source
+# packages and slighlty reformat the list (using | as field sepperator)
+# the 'tr -d "\n" ; echo' is needed, as psql seems to always print two
+# newlines; didn't find a away to parameter for psql to prevent that
 while read source rcbugs ; do echo -en "$source|$rcbugs|" ; /usr/bin/psql -h localhost -p 5441 -U guest -f source-builds.sql udd --tuples-only --set="source='$source'" |tr -d "\n" ; echo; done < $SOURCE_RCBUGS > $SOURCE_RCBUGS_BUILDS
 
 PATTERNS=$(mktemp)
 
+# now we create a list of dependencie patterns for a later grep
+# First we download the list of Source Packages and binary Packages and
+# extrect the depency and build-dependency lines
+# These lines are then reformat (removal of version number, archs and
+# alternatives), so we end up with one package per line.
+# The output format ".*|.*|.*$package" is needed as that is used as a
+# pattenr for the grep
 (wget -q -O- http://ftp.debian.org/debian/dists/sid/main/source/Sources.gz | zgrep Build-Depends:|sed -e "s/^Build-Depends: //;s/ \[.*\]//g;s/ (.*)//g;s/, /\n/g;s/ | /\n/g" ; wget -q -O- http://ftp.debian.org/debian/dists/sid/main/binary-amd64/Packages.gz | zgrep Depends:|sed -e "s/^Depends: //;s/ (.*)//g;s/, /\n/g;s/ | /\n/g" )|sort -u|while read depends ; do echo ".*|.*|.*$depends" ; done > $PATTERNS
 
+# Not we remove the lines matching the patterns we just created from the
+# source-rc-bugs-builds file.
 grep -v -f $PATTERNS $SOURCE_RCBUGS_BUILDS
 
+# cleaning up our temporary files
 rm -f $PATTERNS $SOURCE_RCBUGS $SOURCE_RCBUGS_BUILDS
 




More information about the Collab-qa-commits mailing list