diff -Nru popularity-contest-1.53ubuntu1/clean-filter popularity-contest-1.54ubuntu1/clean-filter --- popularity-contest-1.53ubuntu1/clean-filter 2010-05-23 01:43:02.000000000 +0200 +++ popularity-contest-1.54ubuntu1/clean-filter 2011-10-12 11:28:37.000000000 +0200 @@ -13,7 +13,7 @@ my $debug = 0; open (PACKAGES, '< packages') or - die ("packages not found. please run get-packages.sh first\n"); + die ("packages not found. please run clean-genpkglist first\n"); while () { chomp; diff -Nru popularity-contest-1.53ubuntu1/debian/changelog popularity-contest-1.54ubuntu1/debian/changelog --- popularity-contest-1.53ubuntu1/debian/changelog 2011-07-01 23:19:31.000000000 +0200 +++ popularity-contest-1.54ubuntu1/debian/changelog 2012-05-19 12:09:41.000000000 +0200 @@ -1,3 +1,41 @@ +popularity-contest (1.54ubuntu1) quantal; urgency=low + + * Merge from debian unstable. (LP: #1001580) Remaining changes: + - Set debconf question priority from "high" to "medium" + - Remove mail-transport-agent recommends + - Branding changes in the description and homepage + - Upload uncompressed reports + - Set submiturls to popcon.ubuntu.com + + -- Angel Abad Sat, 19 May 2012 12:02:29 +0200 + +popularity-contest (1.54) unstable; urgency=low + + [ Bill Allombert ] + * README: mention move to subversion. + * popanal.py: sync with popcon.debian.org version: + - sort packages by name in all-popcon-results to prevent data leak. + Closes: #634474 Thanks Timo Juhani Lindfors for finding this issue. + - add support for generating stats for stable reports. + * popcon.pl, popcon-stat.pl, popcon-process.pl: sync: + - Add support for generating the stable reports part of the website. + * clean-filter: fix typo in error message. Patch from Bryce Nesbitt. + * popcon-stat.pl: Fix y-scale. Closes: #651902 Thanks Ben Hutchings. + * popanal.py, popcon-process.sh, popcon.pl: + - /org->/srv transition for new popcon.debian.org host. + * debian/control: + - Updated Standards-Version from 3.9.2 to 3.9.3. No change needed. + * popcon-largest-unused: + - Do not fail when there are no OLD packages. + Closes: #666771 Thanks Jeffrey Sheinberg + + [ Debconf translations ] + * Sinhala; (Danishka Navin). Closes: #640757 + * Icelandic (Sveinn í Felli). + * Kannada (Vikram Vincent). Closes: #659342 + + -- Bill Allombert Wed, 09 May 2012 00:03:32 +0200 + popularity-contest (1.53ubuntu1) oneiric; urgency=low * Merge from debian unstable. (LP: #804167) Remaining changes: diff -Nru popularity-contest-1.53ubuntu1/debian/control popularity-contest-1.54ubuntu1/debian/control --- popularity-contest-1.53ubuntu1/debian/control 2011-07-01 23:19:30.000000000 +0200 +++ popularity-contest-1.54ubuntu1/debian/control 2012-05-19 12:02:21.000000000 +0200 @@ -6,7 +6,7 @@ Uploaders: Petter Reinholdtsen , Bill Allombert Build-Depends: debhelper (>=5) Homepage: http://popcon.ubuntu.com/ -Standards-Version: 3.9.2 +Standards-Version: 3.9.3 Package: popularity-contest Architecture: all diff -Nru popularity-contest-1.53ubuntu1/debian/po/is.po popularity-contest-1.54ubuntu1/debian/po/is.po --- popularity-contest-1.53ubuntu1/debian/po/is.po 1970-01-01 01:00:00.000000000 +0100 +++ popularity-contest-1.54ubuntu1/debian/po/is.po 2012-01-10 14:41:43.000000000 +0100 @@ -0,0 +1,68 @@ +# translation of popularity-contest_debian_po.po to Icelandic +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans# +# Developers do not need to manually edit POT or PO files. +# +# Sveinn í Felli , 2011. +msgid "" +msgstr "" +"Project-Id-Version: popularity-contest_debian_po\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2006-07-29 12:23+0200\n" +"PO-Revision-Date: 2011-12-27 18:47+0000\n" +"Last-Translator: Sveinn í Felli \n" +"Language-Team: Icelandic \n" +"Language: is\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" + +#. Type: boolean +#. Description +#: ../templates:4 +msgid "Participate in the package usage survey?" +msgstr "Viltu taka þátt í könnun á pakkanotkun?" + +#. Type: boolean +#. Description +#: ../templates:4 +msgid "" +"The system may anonymously supply the distribution developers with " +"statistics about the most used packages on this system. This information " +"influences decisions such as which packages should go on the first " +"distribution CD." +msgstr "" +"Hægt er að láta kerfið senda upplýsingar um mest notuðu hugbúnaðarpakkana á " +"kerfinu til þeirra sem eru að þróa og viðhalda dreifingunni. Þessar " +"upplýsingar hafa meðal annars áhrif á ákvarðanir um hvaða pakkar eigi að " +"fara á fyrsta uppsetningardisk." + +#. Type: boolean +#. Description +#: ../templates:4 +msgid "" +"If you choose to participate, the automatic submission script will run once " +"every week, sending statistics to the distribution developers. The collected " +"statistics can be viewed on http://popcon.debian.org/." +msgstr "" +"Ef þú ákveður að taka þátt, mun sjálfvirk skrifta keyrast einu sinni í viku " +"og senda tölfræði til þróunarteymisins. Hægt er að skoða " +"heildarniðurstöðurnar á http://popcon.debian.org/." + +#. Type: boolean +#. Description +#: ../templates:4 +msgid "" +"This choice can be later modified by running \"dpkg-reconfigure popularity-" +"contest\"." +msgstr "" +"Það er hægt að breyta þessu vali síðar með því að keyra \"dpkg-reconfigure " +"popularity-contest\"." diff -Nru popularity-contest-1.53ubuntu1/debian/po/kn.po popularity-contest-1.54ubuntu1/debian/po/kn.po --- popularity-contest-1.53ubuntu1/debian/po/kn.po 2010-05-23 01:43:02.000000000 +0200 +++ popularity-contest-1.54ubuntu1/debian/po/kn.po 2012-03-11 14:07:57.000000000 +0100 @@ -1,7 +1,5 @@ # translation of popularity-contest_debian_kn.po to -# Vikram Vincent , 2007. -# -# +# Vikram Vincent , 2007, 2012. msgid "" msgstr "" "Project-Id-Version: popularity-contest_debian_kn\n" @@ -9,7 +7,9 @@ "POT-Creation-Date: 2006-07-29 12:23+0200\n" "PO-Revision-Date: 2007-05-03 09:15+0530\n" "Last-Translator: Vikram Vincent \n" -"Language-Team: Debian Kannada Localisation\n" +"Language-Team: Debian Kannada Localisation \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff -Nru popularity-contest-1.53ubuntu1/debian/po/si.po popularity-contest-1.54ubuntu1/debian/po/si.po --- popularity-contest-1.53ubuntu1/debian/po/si.po 1970-01-01 01:00:00.000000000 +0100 +++ popularity-contest-1.54ubuntu1/debian/po/si.po 2011-10-12 11:28:37.000000000 +0200 @@ -0,0 +1,67 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +# Danishka Navin , 2011. +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2006-07-29 12:23+0200\n" +"PO-Revision-Date: 2011-09-05 12:44+0530\n" +"Last-Translator: Danishka Navin \n" +"Language-Team: American English \n" +"Language: en_US\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.2\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. Type: boolean +#. Description +#: ../templates:4 +msgid "Participate in the package usage survey?" +msgstr "පැකේජ භාවිත සමීක්‍ෂණයට සහභාගී වේද?" + +#. Type: boolean +#. Description +#: ../templates:4 +msgid "" +"The system may anonymously supply the distribution developers with " +"statistics about the most used packages on this system. This information " +"influences decisions such as which packages should go on the first " +"distribution CD." +msgstr "" +"පද්ධතිය නිකුතු සංවර්ධකයන් හට ඇවැසි භාවිත පැකේජ නිර්නාමිකව සැපයීමට ඉඩ ඇත. මෙම තොරතුරු කුමන " +"පැකේජය CD තැටිය සමඟ ලැබේදැයි තීරණය කරයි." + +#. Type: boolean +#. Description +#: ../templates:4 +msgid "" +"If you choose to participate, the automatic submission script will run once " +"every week, sending statistics to the distribution developers. The collected " +"statistics can be viewed on http://popcon.debian.org/." +msgstr "" +"ඔබ සහභාගී වීමට තෝරාගත්තේ නම්. සංවර්ධකයන්ට තොරතුරු ලබාදෙන ස්වයංක්‍රීය ඇතුළත් කිරීම් විධානාවලියක් " +"සැම සතියකම ධාවනය වනු ඇත. එක් කරගත් තොරතුරු http://popcon.debian.org/ හීදී දැකිය හැක." + +#. Type: boolean +#. Description +#: ../templates:4 +msgid "" +"This choice can be later modified by running \"dpkg-reconfigure popularity-" +"contest\"." +msgstr "" +"මෙම තෝරාගැනීම පසුව \"dpkg-reconfigure popularity-contest\" වෙනස් කිරීම මගින් සැකසිය " +"හැක." diff -Nru popularity-contest-1.53ubuntu1/popanal.py popularity-contest-1.54ubuntu1/popanal.py --- popularity-contest-1.53ubuntu1/popanal.py 2010-05-23 01:43:02.000000000 +0200 +++ popularity-contest-1.54ubuntu1/popanal.py 2012-05-08 19:20:22.000000000 +0200 @@ -5,10 +5,11 @@ # import sys, string, time, glob, gzip +mirrorbase = "/srv/mirrors/debian" + def ewrite(s): sys.stderr.write("%s\n" % s) - class Vote: yes = 0 old_unused = 0 @@ -16,37 +17,59 @@ empty_package = 0 def vote_for(vote, package, entry): - now = time.time() - if entry.atime == 0: # no atime: empty package - vote.empty_package = vote.empty_package + 1 - elif now - entry.atime > 30 * 24*3600: # 30 days since last use: old - vote.old_unused = vote.old_unused + 1 - elif now - entry.ctime < 30 * 24* 3600 \ - and entry.atime - entry.ctime < 24*3600: # upgraded too recently - vote.too_recent = vote.too_recent + 1 - else: # otherwise, vote for this package - vote.yes = vote.yes + 1 - -UNKNOWN = '**UNKNOWN**' + now = time.time() + if entry.atime == 0: # no atime: empty package + vote.empty_package = vote.empty_package + 1 + elif now - entry.atime > 30 * 24*3600: # 30 days since last use: old + vote.old_unused = vote.old_unused + 1 + elif now - entry.ctime < 30 * 24* 3600 \ + and entry.atime - entry.ctime < 24*3600: # upgraded too recently + vote.too_recent = vote.too_recent + 1 + else: # otherwise, vote for this package + vote.yes = vote.yes + 1 -votelist = {} -sectlist = { UNKNOWN : [] } deplist = {} provlist = {} -complained = {} -release_list = {} -arch_list = {} -subcount = 0 -mirrorbase = "/org/ftp.debian.org/ftp" +class Stat: + def __init__(self): + self.vote = {} + self.release = {} + self.arch = {} + self.count = 0 + + def output(self,filename): + out = open(filename, 'w') + out.write("Submissions: %8d\n" % self.count) + releaselist = self.release.keys() + releaselist.sort() + for release in releaselist: + out.write("Release: %-30s %5d\n" + % (release, self.release[release])) + archlist = self.arch.keys() + archlist.sort() + for arch in archlist: + out.write("Architecture: %-30s %5d\n" + % (arch, self.arch[arch])) + pkglist = self.vote.keys() + pkglist.sort() + for package in pkglist: + fv = self.vote[package] + out.write("Package: %-30s %5d %5d %5d %5d\n" + % (package, fv.yes, fv.old_unused, + fv.too_recent, fv.empty_package)) + out.close() + +stat = Stat() +stat_stable = Stat() def parse_depends(depline): l = [] split = string.split(depline, ',') for d in split: - x = string.split(d) - if (x): - l.append(x[0]) + x = string.split(d) + if (x): + l.append(x[0]) return l @@ -55,39 +78,30 @@ package = None while 1: - line = file.readline() - if line: - if line[0]==' ' or line[0]=='\t': continue # continuation - split = string.split(line, ':') - - if not line or split[0]=='Package': - if package and (len(dep) > 0 or len(prov) > 0): - deplist[package] = dep - for d in prov: - if not provlist.has_key(d): - provlist[d] = [] - provlist[d].append(package) - if package: - if not sectlist.has_key(section): - sectlist[section] = [] - if not votelist.has_key(package): - sectlist[section].append(package) - votelist[package] = Vote() - ewrite(package) - package = None - if line: - package = string.strip(split[1]) - section = UNKNOWN - dep = [] - prov = [] - elif split[0]=='Section': - section = string.strip(split[1]) - elif split[0]=='Depends' or split[0]=='Requires': - dep = dep + parse_depends(split[1]) - elif split[0]=='Provides': - prov = parse_depends(split[1]) - - if not line: break + line = file.readline() + if line: + if line[0]==' ' or line[0]=='\t': continue # continuation + split = string.split(line, ':') + + if not line or split[0]=='Package': + if package and (len(dep) > 0 or len(prov) > 0): + deplist[package] = dep + for d in prov: + if not provlist.has_key(d): + provlist[d] = [] + provlist[d].append(package) + if package: + package = None + if line: + package = string.strip(split[1]) + dep = [] + prov = [] + elif split[0]=='Depends' or split[0]=='Requires': + dep = dep + parse_depends(split[1]) + elif split[0]=='Provides': + prov = parse_depends(split[1]) + + if not line: break class Entry: @@ -96,12 +110,12 @@ mru_file = ''; def __init__(self, atime, ctime, mru_file): - try: - self.atime = long(atime) - self.ctime = long(ctime) - except: - self.atime = self.ctime = 0 - self.mru_file = mru_file + try: + self.atime = long(atime) + self.ctime = long(ctime) + except: + self.atime = self.ctime = 0 + self.mru_file = mru_file class Submission: @@ -115,129 +129,118 @@ # initialize a new entry with known data def __init__(self, version, owner_id, date): - self.entries = {} - self.start_date = long(date) - ewrite('%s:\n\tSTART: %s' % (owner_id, time.ctime(long(date)))) + self.entries = {} + self.start_date = long(date) # process a line of input from the survey def addinfo(self, split): - if len(split) < 4: - ewrite('Invalid input line: ' + `split`) - return - self.entries[split[2]] = Entry(split[0], split[1], split[3]) + if len(split) < 4: + ewrite('Invalid input line: ' + `split`) + return + self.entries[split[2]] = Entry(split[0], split[1], split[3]) # update the atime of dependency to that of dependant, if newer def update_atime(self, dependency, dependant): - if not self.entries.has_key(dependency): return - e = self.entries[dependency] - f = self.entries[dependant] - if e.atime < f.atime: - e.atime = f.atime - e.ctime = f.ctime + if not self.entries.has_key(dependency): return + e = self.entries[dependency] + f = self.entries[dependant] + if e.atime < f.atime: + e.atime = f.atime + e.ctime = f.ctime # we found the last line of the survey: finish it - def done(self, date): - ewrite('\t STOP: after %d seconds, %d packages' - % (date - self.start_date, len(self.entries))) - for package in self.entries.keys(): - e = self.entries[package] - if deplist.has_key(package): - for d in deplist[package]: - self.update_atime(d, package) - if provlist.has_key(d): - for dd in provlist[d]: - self.update_atime(dd, package) - for package in self.entries.keys(): - if not votelist.has_key(package): - if not complained.has_key(package): - ewrite(('Warning: package %s neither in ' - + 'stable nor unstable') % package) - complained[package] = 1 - votelist[package] = Vote() - sectlist[UNKNOWN].append(package) - votelist[package].vote_for(package, self.entries[package]) + def done(self, date, st): + st.count = st.count + 1 + for package in self.entries.keys(): + if deplist.has_key(package): + for d in deplist[package]: + self.update_atime(d, package) + if provlist.has_key(d): + for dd in provlist[d]: + self.update_atime(dd, package) + for package in self.entries.keys(): + if not st.vote.has_key(package): + st.vote[package] = Vote() + st.vote[package].vote_for(package, self.entries[package]) - if not release_list.has_key(self.release): - release_list[self.release] = 1 + if not st.release.has_key(self.release): + st.release[self.release] = 1 else: - release_list[self.release] = release_list[self.release] + 1 + st.release[self.release] = st.release[self.release] + 1 + ewrite("#%s %s" % (st.release[self.release], self.release)) - if not arch_list.has_key(self.arch): - arch_list[self.arch] = 1 + if not st.arch.has_key(self.arch): + st.arch[self.arch] = 1 else: - arch_list[self.arch] = arch_list[self.arch] + 1 + st.arch[self.arch] = st.arch[self.arch] + 1 def headersplit(pairs): header = {} for d in pairs: - list = string.split(d, ':') - try: - key, value = list - header[key] = value - except: - pass + list = string.split(d, ':') + try: + key, value = list + header[key] = value + except: + pass return header def read_submissions(stream): - global subcount e = None while 1: - line = stream.readline() - if not line: break + line = stream.readline() + if not line: break - split = string.split(line) - if not split: continue + split = string.split(line) + if not split: continue - if split[0]=='POPULARITY-CONTEST-0': - header = headersplit(split[1:]) + if split[0]=='POPULARITY-CONTEST-0': + header = headersplit(split[1:]) - if not header.has_key('ID') or not header.has_key('TIME'): - ewrite('Invalid header: ' + split) - continue - - subcount = subcount + 1 - ewrite('#%s' % subcount) - e = None - try: - e = Submission(0, header['ID'], header['TIME']) - except: - ewrite('Invalid date: ' + header['TIME'] + ' for ID ' + header['ID']) - continue + if not header.has_key('ID') or not header.has_key('TIME'): + ewrite('Invalid header: ' + split[1]) + continue + + e = None + try: + e = Submission(0, header['ID'], header['TIME']) + except: + ewrite('Invalid date: ' + header['TIME'] + ' for ID ' + header['ID']) + continue if header.has_key('POPCONVER'): - if header['POPCONVER']=='': - e.release = 'unknown' - elif header['POPCONVER']=='1.27.bill.1': - e.release = '1.27' - else: - e.release = header['POPCONVER'] - + if header['POPCONVER']=='': + e.release = 'unknown' + else: + e.release = header['POPCONVER'] + if header.has_key('ARCH'): - if header['ARCH']=='x86_64': + if header['ARCH']=='x86_64': e.arch = 'amd64' - elif header['ARCH']=='i386-gnu': + elif header['ARCH']=='i386-gnu': e.arch = 'hurd-i386' - elif header['ARCH']=='': + elif header['ARCH']=='': e.arch = 'unknown' - else: + else: e.arch = header['ARCH'] - elif split[0]=='END-POPULARITY-CONTEST-0' and e != None: - header = headersplit(split[1:]) - if header.has_key('TIME'): - try: - date = long(header['TIME']) - except: - ewrite('Invalid date: ' + header['TIME']) - continue - e.done(date) - e = None + elif split[0]=='END-POPULARITY-CONTEST-0' and e != None: + header = headersplit(split[1:]) + if header.has_key('TIME'): + try: + date = long(header['TIME']) + except: + ewrite('Invalid date: ' + header['TIME']) + continue + e.done(date,stat) + if e.release=='1.49': + e.done(date,stat_stable) + e = None - elif e != None: - e.addinfo(split) + elif e != None: + e.addinfo(split) # end of while loop - ewrite('Processed %d submissions.' % subcount) # main program @@ -247,32 +250,5 @@ for d in glob.glob('%s/dists/unstable/*/binary-i386/Packages.gz' % mirrorbase): read_depends(d) read_submissions(sys.stdin) - -def nicename(s): - new_s = '' - for c in s: - if c == '/': - new_s = new_s + ','; - elif c in string.letters or c in string.digits or c=='-': - new_s = new_s + c - else: - new_s = new_s + '.' - return new_s - -# dump the results -out = open('results', 'w') -out.write("Submissions: %8d\n" % subcount) -for release in release_list.keys(): - out.write("Release: %-30s %5d\n" - % (release, release_list[release])) - -for arch in arch_list.keys(): - out.write("Architecture: %-30s %5d\n" - % (arch, arch_list[arch])) -for section in sectlist.keys(): - for package in sectlist[section]: - fv = votelist[package] - out.write("Package: %-30s %5d %5d %5d %5d\n" - % (package, fv.yes, fv.old_unused, - fv.too_recent, fv.empty_package)) - +stat.output("results") +stat_stable.output("results.stable") diff -Nru popularity-contest-1.53ubuntu1/popcon-largest-unused popularity-contest-1.54ubuntu1/popcon-largest-unused --- popularity-contest-1.53ubuntu1/popcon-largest-unused 2010-05-23 01:43:02.000000000 +0200 +++ popularity-contest-1.54ubuntu1/popcon-largest-unused 2012-05-09 00:03:06.000000000 +0200 @@ -12,7 +12,7 @@ fi grep '' $datafile | cut -d' ' -f3 | - xargs apt-cache -o 'APT::Cache::AllVersions=0' show | + xargs -r apt-cache -o 'APT::Cache::AllVersions=0' show | grep -E '^(Package|Installed-Size): ' | perl -ne 'if (/^Package: (.*)/) { $p = $1 }; if (/^Installed-Size: (.*)/) { print "$1 $p\n"; $p = 'BUG' }' | sort -rn diff -Nru popularity-contest-1.53ubuntu1/popcon.pl popularity-contest-1.54ubuntu1/popcon.pl --- popularity-contest-1.53ubuntu1/popcon.pl 2011-03-30 17:18:45.000000000 +0200 +++ popularity-contest-1.54ubuntu1/popcon.pl 2012-05-08 19:20:22.000000000 +0200 @@ -1,11 +1,49 @@ #! /usr/bin/perl -wT -$results="../popcon-mail/results"; -$popcon="../www"; -my $mirrorbase = "/org/ftp.debian.org/ftp"; -my $docurlbase = ""; -%popconver=("1.28" => "sarge", "1.41" => "etch", "1.46" => "lenny", "1.49" => "squeeze"); -%popver=(); +use strict; + +$ENV{PATH}="/bin:/usr/bin"; + +my %results=('all' => "../popcon-mail/results", 'stable' => "../popcon-mail/results.stable"); +my $popbase = "../www"; +my %popcon= ('all' => "", 'stable' => "/stable"); +my %popfile=('all' => "all-popcon-results.gz", 'stable' => "stable-popcon-results.gz"); +my %poptext=('all' => "All reports", 'stable' => "Stable reports"); +my $mirrorbase = "/srv/mirrors/debian"; +my $docurlbase = "/"; +my %popconver=("1.28" => "sarge", "1.41" => "etch", "1.46" => "lenny", "1.49" => "squeeze"); +my %popver=(); +my @dists=("main","contrib","non-free","non-US"); +my @fields=("inst","vote","old","recent","no-files"); +my %maint=(); +my %list_header=( +"maint" => <<"EOF", +# is the developer name; +# +#The fields below are the sum for all the packages maintained by that +#developer: +EOF +"source" => <<"EOF", +# is the source package name; +# +#The fields below are the sum for all the binary packages generated by +#that source package: +EOF +"sourcemax" => <<"EOF"); +# is the source package name; +# +#The fields below are the maximum for all the binary packages generated by +#that source package: +EOF + +# Progress indicator + +sub mark +{ + print join(" ",$_[0],times),"\n"; +} + +# HTML templates sub htmlheader { @@ -54,7 +92,9 @@ sub popconintro { - print HTML <<"EOH"; + my ($name,$page) = @_; + &htmlheader; + print HTML <<"EOF";

The popularity contest project is an attempt to map the usage of Debian packages. This site publishes the statistics gathered from report sent by users of the

-EOH + + +

+
+EOF } sub htmlfooter { + my ($numsub) = @_; my $date=gmtime(); print HTML < @@ -92,7 +164,7 @@ EOF print HTML < -
+
Made by Bill Allombert . Last generated on $date UTC.
Popularity-contest project by Avery Pennarun, Bill Allombert and Petter Reinholdtsen. @@ -105,9 +177,11 @@ EOH } +# Report generators + sub make_sec { - my $sec="$popcon/$_[0]"; + my $sec="$_[0]/$_[1]"; -d $sec || system("mkdir","-p","$sec"); } @@ -117,32 +191,12 @@ print HTML ("$f [gz] "); } -%list_header=( -"maint" => <<"EOF", -# is the developer name; -# -#The fields below are the sum for all the packages maintained by that -#developer: -EOF -"source" => <<"EOF", -# is the source package name; -# -#The fields below are the sum for all the binary packages generated by -#that source package: -EOF -"sourcemax" => <<"EOF"); -# is the source package name; -# -#The fields below are the maximum for all the binary packages generated by -#that source package: -EOF - sub make_by { - my ($sec,$order,$pkg,@list) = @_; + my ($popcon,$sec,$order,$pkg,$winner,$listp) = @_; my (%sum, $me); - @list = sort {$pkg->{$b}->{$order}<=> $pkg->{$a}->{$order} || $a cmp $b } @list; - $winner{"$sec/$order"}=$list[0]; + my @list = sort {$pkg->{$b}->{$order}<=> $pkg->{$a}->{$order} || $a cmp $b } @{$listp}; + $winner->{"$sec/$order"}=$list[0]; open DAT , "|-:utf8", "tee $popcon/$sec/by_$order | gzip -c > $popcon/$sec/by_$order.gz"; if (defined($list_header{$sec})) { @@ -168,8 +222,9 @@ # information (atime and ctime were 0). #rank name inst vote old recent no-files $me EOF - $format="%-5d %-30s".(" %5d"x($#fields+1))." %-32s\n"; + my $format="%-5d %-30s".(" %5d"x($#fields+1))." %-32s\n"; my $rank=0; + my $p; for $p (@list) { $rank++; @@ -184,9 +239,9 @@ sub make { - my ($sec,$pkg,@list)=@_; - make_sec $sec; - make_by ($sec, $_, $pkg, @list) for (@fields); + my ($popcon, $sec,$pkg,$winner,$list)=@_; + make_sec ($popcon,$sec); + make_by ($popcon, $sec, $_, $pkg, $winner, $list) for (@fields); } sub print_pkg { @@ -197,71 +252,9 @@ print HTML "$pkgt ", ' 'x(20-$size); } -sub mark -{ - print join(" ",$_[0],times),"\n"; -} - -%pkg=(); -%section=(); -%maint=(); -%source=(); -%winner=(); -%maintpkg=(); -%sourcepkg=(); -%sourcemax=(); -@fields=("inst","vote","old","recent","no-files"); - -for $file ("slink","slink-nonUS","potato","potato-nonUS", - "woody","woody-nonUS","sarge","etch") -{ - open AVAIL, "<:utf8", "$file.sections" or die "Cannot open $file.sections"; - while() - { - my ($p,$sec)=split(' '); - defined($sec) or last; - chomp $sec; - $sec =~ m{^(non-US|contrib|non-free)/} or $sec="main/$sec"; - $section{$p}=$sec; - $maint{$p}="Not in sid"; - $source{$p}="Not in sid"; - } - close AVAIL; -} -mark "Reading legacy packages..."; -$ENV{PATH}="/bin:/usr/bin"; - -for $dist ("stable", "testing", "unstable") -{ - for (glob("$mirrorbase/dists/$dist/*/binary-*/Packages.gz")) - { - /([^[:space:]]+)/ or die("incorrect package name"); - $file = $1;#Untaint - open AVAIL, "-|:encoding(UTF-8)","zcat $file"; - while() - { - /^Package: (.+)/ and do {$p=$1;$maint{$p}="bug";$source{$p}=$p;next;}; - /^Version: (.+)/ && $p eq "popularity-contest" - and do { $popver{$dist}=$1; next;}; - /^Maintainer: ([^()]+) (\(.+\) )*<.+>/ - and do { $maint{$p}=join(' ',map{ucfirst($_)} split(' ',lc $1));next;}; - /^Source: (\S+)/ and do { $source{$p}=$1;next;}; - /^Section: (.+)/ or next; - $sec=$1; - $sec =~ m{^(non-US|contrib|non-free)/} or $sec="main/$sec"; - $section{$p}=$sec; - } - close AVAIL; - } -} -for $dist ("stable", "testing", "unstable") -{ - my($v)=$popver{$dist}; - $popconver{$v}=defined($popconver{$v})?"$popconver{$v}/$dist":$dist; -} - -mark "Reading current packages..."; +my %section=(); +my %source=(); #Format # @@ -273,168 +266,186 @@ # is the number of people who upgraded this package recently; # is the number of people whose entry didn't contain enough # information (atime and ctime were 0). -open PKG, "<:utf8","$results"; -while() + +sub read_result { - my ($type,@values)=split(" "); - if ($type eq "Package:") - { - my @votes=@values; - $name = shift @votes; - unshift @votes,$votes[0]+$votes[1]+$votes[2]+$votes[3]; - $section{$name}='unknown' unless (defined($section{$name})); - $maint{$name}='Not in sid' unless (defined($maint{$name})); - $source{$name}='Not in sid' unless (defined($source{$name})); - for(my $i=0;$i<=$#fields;$i++) - { - my ($f,$v)=($fields[$i],$votes[$i]); - $pkg{$name}->{$f}=$v; - $maintpkg{$maint{$name}}->{$f}+=$v; - $sourcepkg{$source{$name}}->{$f}+=$v; - my($sm)=$sourcemax{$source{$name}}->{$f}; - $sourcemax{$source{$name}}->{$f}=$v - if (!defined($sm) || $sm < $v); - } - } - elsif ($type eq "Architecture:") - { - my ($a,$nb)=@values; - $arch{$a}=$nb; - } - elsif ($type eq "Submissions:") - { - ($numsub)=@values; - } - elsif ($type eq "Release:") + my ($name) = @_; + my $results = $results{$name}; + my (%pkg,%maintpkg,%sourcepkg,%sourcemax,%arch,$numsub,%release); + open PKG, "<:utf8","$results" or die "$results not found"; + while() { - my ($a,$nb)=@values; - $release{$a}=$nb; + my ($type,@values)=split(" "); + if ($type eq "Package:") + { + my @votes = @values; + my $name = shift @votes; + unshift @votes,$votes[0]+$votes[1]+$votes[2]+$votes[3]; + $section{$name}='unknown' unless (defined($section{$name})); + $maint{$name}='Not in sid' unless (defined($maint{$name})); + $source{$name}='Not in sid' unless (defined($source{$name})); + for(my $i=0;$i<=$#fields;$i++) + { + my ($f,$v)=($fields[$i],$votes[$i]); + $pkg{$name}->{$f}=$v; + $maintpkg{$maint{$name}}->{$f}+=$v; + $sourcepkg{$source{$name}}->{$f}+=$v; + my($sm)=$sourcemax{$source{$name}}->{$f}; + $sourcemax{$source{$name}}->{$f}=$v + if (!defined($sm) || $sm < $v); + } + } + elsif ($type eq "Architecture:") + { + my ($a,$nb)=@values; + $arch{$a}=$nb; + } + elsif ($type eq "Submissions:") + { + ($numsub)=@values; + } + elsif ($type eq "Release:") + { + my ($a,$nb)=@values; + $release{$a}=$nb; + } } -} -mark "Reading stats..."; - -@pkgs=sort keys %pkg; -%sections = map {$section{$_} => 1} keys %section; -@sections = sort keys %sections; -@maints= sort keys %maintpkg; -@sources= sort keys %sourcepkg; - -for $sec (@sections) -{ - my @list = grep {$section{$_} eq $sec} @pkgs; - make ($sec, \%pkg, @list); -} - -mark "Building by sections pages"; - -@dists=("main","contrib","non-free","non-US"); -#There is a hack: '.' is both the current directory and -#the catchall regexp. - -for $sec (".",@dists) -{ - my @list = grep {$section{$_} =~ /^$sec/ } @pkgs; - make ($sec, \%pkg, @list); -} -make ("maint", \%maintpkg, @maints); -make ("source", \%sourcepkg, @sources); -make ("sourcemax", \%sourcemax, @sources); - -for $sec (@dists) -{ - open HTML , ">:utf8", "$popcon/$sec/index.html"; - opendir SEC,"$popcon/$sec"; - &htmlheader; - printf HTML ("

Statistics for the section %-16s sorted by fields: ",$sec); + close PKG; + return {'name' => $name, + 'pkg' => \%pkg, + 'maintpkg' => \%maintpkg, + 'sourcepkg' => \%sourcepkg, + 'sourcemax' => \%sourcemax, + 'arch' => \%arch, + 'release' => \%release, + 'numsub' => $numsub}; +} + +sub gen_sections +{ + my ($stat) = @_; + my $name = $stat->{'name'}; + my %pkg = %{$stat->{'pkg'}}; + my %maintpkg = %{$stat->{'maintpkg'}}; + my %sourcepkg = %{$stat->{'sourcepkg'}}; + my %sourcemax = %{$stat->{'sourcemax'}}; + my %arch = %{$stat->{'arch'}}; + my %release = %{$stat->{'release'}}; + my $numsub = $stat->{'numsub'}; + my $popcon = "$popbase$popcon{$name}"; + my $popfile = $popfile{$name}; + my @pkgs=sort keys %pkg; + my %sections = map {$section{$_} => 1} keys %section; + my @sections = sort keys %sections; + my @maints= sort keys %maintpkg; + my @sources= sort keys %sourcepkg; + my %winner = (); + my ($sec, $dir, $f); + for $sec (@sections) + { + my @list = grep {$section{$_} eq $sec} @pkgs; + make ($popcon, $sec, \%pkg, \%winner, \@list); + } + #There is a hack: '.' is both the current directory and + #the catchall regexp. + for $sec (".",@dists) + { + my @list = grep {$section{$_} =~ /^$sec/ } @pkgs; + make ($popcon, $sec, \%pkg, \%winner, \@list); + } + make ($popcon, "maint", \%maintpkg, \%winner, \@maints); + make ($popcon, "source", \%sourcepkg, \%winner, \@sources); + make ($popcon, "sourcemax", \%sourcemax, \%winner, \@sources); + + for $sec (@dists) + { + open HTML , ">:utf8", "$popcon/$sec/index.html"; + opendir SEC,"$popcon/$sec"; + popconintro($name,"$sec/index.html"); + printf HTML ("

Statistics for the section %-16s sorted by fields: ",$sec); + print_by (".",$_) for (@fields); + print HTML ("\n

\n"); + printf HTML ("

First packages in subsections for each fields \n"); + printf HTML ("

Statistics for subsections sorted by fields\n

\n");
+    for $dir (sort readdir SEC)
+    {
+      -d "$popcon/$sec/$dir" or next;
+      $dir !~ /^\./ or next;
+      printf HTML ("%-16s : ",$dir);
+      print_by ($dir,$_) for (@fields);
+      print HTML ("\n");
+    }
+    print HTML ("\n 
\n"); + htmlfooter $numsub; + closedir SEC; + close HTML; + } + for $sec (@dists) + { + open HTML , ">:utf8", "$popcon/$sec/first.html"; + opendir SEC,"$popcon/$sec"; + popconintro($name,"$sec/first.html"); + printf HTML ("

First package in section %-16s for fields: ",$sec); + for $f (@fields) + { + print_pkg $winner{"$sec/$f"}; + } + print HTML ("\n

\n"); + printf HTML ("

Statistics by subsections sorted by fields \n"); + printf HTML ("

First package in subsections for fields\n

\n");
+    printf HTML ("%-16s : ","subsection");
+    for $f (@fields)
+    {
+            printf HTML ("%-20s ",$f);
+    }
+    print HTML ("\n","_"x120,"\n");
+    for $dir (sort readdir SEC)
+    {
+            -d "$popcon/$sec/$dir" or next;
+            $dir !~ /^\./ or next;
+            printf HTML ("%-16s : ",$dir);
+            for $f (@fields)
+            {
+                    print_pkg $winner{"$sec/$dir/$f"};
+            }
+            print HTML ("\n");
+    }
+    print HTML ("\n 
\n"); + htmlfooter $numsub; + closedir SEC; + close HTML; + } + open HTML , ">:utf8", "$popcon/index.html"; + popconintro($name,"index.html"); + printf HTML ("

Statistics for the whole archive sorted by fields:

");
   print_by (".",$_) for (@fields);
-  print HTML ("\n 

\n"); - printf HTML ("

First packages in subsections for each fields \n"); - printf HTML ("

Statistics for subsections sorted by fields\n

\n");
-  for $dir (sort readdir SEC)
+  print HTML ("
\n

\n"); + printf HTML ("

Statistics by maintainers sorted by fields:

");
+  print_by ("maint",$_) for (@fields);
+  print HTML ("
\n

\n"); + printf HTML ("

Statistics by source packages (sum) sorted by fields:

");
+  print_by ("source",$_) for (@fields);
+  print HTML ("
\n

\n"); + printf HTML ("

Statistics by source packages (max) sorted by fields:

");
+  print_by ("sourcemax",$_) for (@fields);
+  print HTML ("
\n

\n"); + printf HTML ("

Statistics for sections sorted by fields\n

\n");
+  for $dir ("main","contrib","non-free","non-US","unknown")
   {
-    -d "$popcon/$sec/$dir" or next;
+    -d "$popcon/$dir" or next;
     $dir !~ /^\./ or next;
-    printf HTML ("%-16s : ",$dir);
+    if ($dir eq "unknown")
+    {
+      printf HTML ("%-16s : ",$dir);
+    }
+    else
+    {
+      printf HTML ("%-16s : ",$dir);
+    }
     print_by ($dir,$_) for (@fields);
     print HTML ("\n");
   }
-  print HTML ("\n 
\n"); - &htmlfooter; - closedir SEC; - close HTML; -} -mark "Building by sub-sections pages"; -for $sec (@dists) -{ - open HTML , ">:utf8", "$popcon/$sec/first.html"; - opendir SEC,"$popcon/$sec"; - &htmlheader; - printf HTML ("

First package in section %-16s for fields: ",$sec); - for $f (@fields) - { - print_pkg $winner{"$sec/$f"}; - } - print HTML ("\n

\n"); - printf HTML ("

Statistics by subsections sorted by fields \n"); - printf HTML ("

First package in subsections for fields\n

\n");
-  printf HTML ("%-16s : ","subsection");
-  for $f (@fields)
-  {
-	  printf HTML ("%-20s ",$f);
-  }
-  print HTML ("\n","_"x120,"\n");
-  for $dir (sort readdir SEC)
-  {
-	  -d "$popcon/$sec/$dir" or next;
-	  $dir !~ /^\./ or next;
-	  printf HTML ("%-16s : ",$dir);
-	  for $f (@fields)
-	  {
-		  print_pkg $winner{"$sec/$dir/$f"};
-	  }
-	  print HTML ("\n");
-  }
-  print HTML ("\n 
\n"); - &htmlfooter; - closedir SEC; - close HTML; -} - -mark "Building winner pages"; - -{ - open HTML , ">:utf8", "$popcon/index.html"; - &htmlheader; - &popconintro; - printf HTML ("

Statistics for the whole archive sorted by fields:

",$sec);
-	print_by (".",$_) for (@fields);
-	print HTML ("
\n

\n"); - printf HTML ("

Statistics by maintainers sorted by fields:

",$sec);
-	print_by ("maint",$_) for (@fields);
-	print HTML ("
\n

\n"); - printf HTML ("

Statistics by source packages (sum) sorted by fields:

",$sec);
-	print_by ("source",$_) for (@fields);
-	print HTML ("
\n

\n"); - printf HTML ("

Statistics by source packages (max) sorted by fields:

",$sec);
-	print_by ("sourcemax",$_) for (@fields);
-	print HTML ("
\n

\n"); - printf HTML ("

Statistics for sections sorted by fields\n

\n");
-  	for $dir ("main","contrib","non-free","non-US","unknown")
-	{
-		-d "$popcon/$dir" or next;
-		$dir !~ /^\./ or next;
-		if ($dir eq "unknown")
-		{
-			printf HTML ("%-16s : ",$dir);
-		}
-		else
-		{
-			printf HTML ("%-16s : ",$dir);
-		}
-		print_by ($dir,$_) for (@fields);
-		print HTML ("\n");
-	}
-	print HTML  <<'EOF';
+  print HTML  <<'EOF';
 
@@ -442,64 +453,132 @@ Statistics per Debian architectures:
 EOF
-        for $f (grep { $_ ne 'unknown' } sort keys %arch)
-        {
-		my ($port)=split('-',$f);
-		$port="$port/";
-		$port="kfreebsd-gnu/" if ($port eq "kfreebsd/");
-                printf HTML "%-16s : %-10s graph\n",$f,$arch{$f};
-        }
-        if (defined $arch{"unknown"}) {
-            printf HTML "%-16s : %-10s graph\n","unknown",$arch{"unknown"}
-        }
-	print HTML  <<'EOF';
-
+ for $f (grep { $_ ne 'unknown' } sort keys %arch) + { + my ($port)=split('-',$f); + $port="$port/"; + $port="kfreebsd-gnu/" if ($port eq "kfreebsd/"); + printf HTML "%-16s : %-10s graph\n",$f,$arch{$f}; + } + if (defined $arch{"unknown"}) { + printf HTML "%-16s : %-10s graph\n","unknown",$arch{"unknown"} + } + print HTML "\n"; + print HTML <<'EOF'; - +EOF + print HTML <<'EOF'; + + for $f (grep { $_ ne 'unknown' } sort keys %release) + { + my($name) = $f; + $name = "$f ($popconver{$f})" if (defined($popconver{$f})); + printf HTML "%-25s : %-10s \n",$name,$release{$f}; + } + if (defined $release{"unknown"}) { + printf HTML "%-25s : %-10s \n","unknown",$release{"unknown"}; + } + print HTML "\n"; + print HTML <<'EOF'; - -
- Graph of number of submissions per architectures + Graph of number of submissions per architectures
- Graph of number of submissions per architectures (last 12 months) + Graph of number of submissions per architectures (last 12 months)
-
+
Statistics per popularity-contest releases:
 EOF
-        for $f (grep { $_ ne 'unknown' } sort keys %release)
-        {
-                my($name) = $f;
-                $name = "$f ($popconver{$f})" if (defined($popconver{$f}));
-                printf HTML "%-25s : %-10s \n",$name,$release{$f};
-        }
-        if (defined $release{"unknown"}) {
-            printf HTML "%-25s : %-10s \n","unknown",$release{"unknown"};
-        }
-	print HTML  <<'EOF';
-
- - - -
- Graph of popularity-contest versions in use -
- Graph of popularity-contest versions in use (12 last months) -
+ + + +
+ Graph of popularity-contest versions in use +
+ Graph of popularity-contest versions in use (12 last months) +
-

EOF + print HTML "

\n"; + print HTML "Raw popularity-contest results\n"; + htmlfooter $numsub; + close HTML; +} + +sub read_packages +{ + my ($file,$dist); + for $file ("slink","slink-nonUS","potato","potato-nonUS", + "woody","woody-nonUS","sarge","etch") + { + open AVAIL, "<:utf8", "$file.sections" or die "Cannot open $file.sections"; + while() + { + my ($p,$sec)=split(' '); + defined($sec) or last; + chomp $sec; + $sec =~ m{^(non-US|contrib|non-free)/} or $sec="main/$sec"; + $section{$p}=$sec; + $maint{$p}="Not in sid"; + $source{$p}="Not in sid"; + } + close AVAIL; + } + mark "Reading legacy packages..."; + for $dist ("stable", "testing", "unstable") + { + for (glob("$mirrorbase/dists/$dist/*/binary-*/Packages.gz")) + { + /([^[:space:]]+)/ or die("incorrect package name"); + my $file = $1;#Untaint + open AVAIL, "-|:encoding(UTF-8)","zcat $file"; + my $p; + while() + { + /^Package: (.+)/ and do {$p=$1;$maint{$p}="bug";$source{$p}=$p;next;}; + /^Version: (.+)/ && $p eq "popularity-contest" + and do { $popver{$dist}=$1; next;}; + /^Maintainer: ([^()]+) (\(.+\) )*<.+>/ + and do { $maint{$p}=join(' ',map{ucfirst($_)} split(' ',lc $1));next;}; + /^Source: (\S+)/ and do { $source{$p}=$1;next;}; + /^Section: (.+)/ or next; + my $sec = $1; + $sec =~ m{^(non-US|contrib|non-free)/} or $sec="main/$sec"; + $section{$p}=$sec; + } + close AVAIL; + } + } + mark "Reading current packages..."; + for $dist ("stable", "testing", "unstable") + { + my($v)=$popver{$dist}; + $popconver{$v}=defined($popconver{$v})?"$popconver{$v}/$dist":$dist; + } +} + +# Main code + +read_packages(); + +mark "Reading packages..."; - print HTML "Raw popularity-contest results\n"; - &htmlfooter; - close HTML; +my %stat = ('all' => read_result('all'), + 'stable' => read_result('stable')); + +mark "Reading stats..."; + +for (keys %stat) +{ + gen_sections($stat{$_}); } -mark "Building index.html"; + +mark "Building pages"; diff -Nru popularity-contest-1.53ubuntu1/popcon-process.sh popularity-contest-1.54ubuntu1/popcon-process.sh --- popularity-contest-1.53ubuntu1/popcon-process.sh 2011-03-30 17:18:45.000000000 +0200 +++ popularity-contest-1.54ubuntu1/popcon-process.sh 2012-05-08 19:20:22.000000000 +0200 @@ -1,12 +1,13 @@ #!/bin/sh -BASEDIR=/org/popcon.debian.org/popcon-mail +BASEDIR=/srv/popcon.debian.org/popcon-mail MAILDIR=../Mail WEBDIR=../www LOGDIR=$BASEDIR/../logs BINDIR=$BASEDIR/../bin DATADIR=$BASEDIR/popcon-entries SUMMARYDIR=$BASEDIR/all-popcon-results +SUMMARYDIRSTABLE=$BASEDIR/all-popcon-results.stable # set to 'true' if email submissions should be processed READMAIL=true @@ -29,18 +30,22 @@ fi # delete outdated entries -rm -f results +rm -f results results.stable find $DATADIR -type f -mtime +$DAYLIMIT -print0 | xargs -0 rm -f -- # Generate statistics find $DATADIR -type f | xargs cat \ | nice -15 $BINDIR/popanal.py >$LOGDIR/popanal.out 2>&1 cp results $WEBDIR/all-popcon-results +cp results.stable $WEBDIR/stable/stable-popcon-results gzip -f $WEBDIR/all-popcon-results +gzip -f $WEBDIR/stable/stable-popcon-results cp $WEBDIR/all-popcon-results.gz $SUMMARYDIR/popcon-`date +"%Y-%m-%d"`.gz +cp $WEBDIR/stable/stable-popcon-results.gz $SUMMARYDIRSTABLE/popcon-`date +"%Y-%m-%d"`.stable.gz cd ../popcon-stat -find $SUMMARYDIR -type f -print | sort | $BINDIR/popcon-stat.pl >$LOGDIR/popstat.log 2>&1 +find $SUMMARYDIR -type f -print | sort | $BINDIR/popcon-stat.pl ../www/stat>$LOGDIR/popstat.log 2>&1 +find $SUMMARYDIRSTABLE -type f -print | sort | $BINDIR/popcon-stat.pl ../www/stable/stat >> $LOGDIR/popstat.log 2>&1 cd ../popcon-web $BINDIR/popcon.pl >$LOGDIR/popcon.log 2>$LOGDIR/popcon.errors diff -Nru popularity-contest-1.53ubuntu1/popcon-stat.pl popularity-contest-1.54ubuntu1/popcon-stat.pl --- popularity-contest-1.53ubuntu1/popcon-stat.pl 2011-03-31 14:42:01.000000000 +0200 +++ popularity-contest-1.54ubuntu1/popcon-stat.pl 2012-01-10 14:41:43.000000000 +0100 @@ -2,18 +2,15 @@ # # Require the debian package libchart-perl. -#BEGIN { -#@INC=("./usr/share/perl5/", @INC); -#} - $ENV{PATH}="/usr/bin:/bin"; -$dirpng="../www/stat"; +$dirpng = shift @ARGV; +$dirpng =~ m/(.*)/ and $dirpng=$1; $oneyearago = `date +"%Y-%m-%d" -d "1 year ago"`; while (<>) { my ($file); - m/^(.*\/popcon-([0-9-]+)\.gz)$/ or next; + m/^(.*\/popcon-([0-9-]+)(\.stable)?\.gz)$/ or next; $file=$1; $f=$2; push @date,$f; @@ -54,9 +51,9 @@ sub ytick { - my ($x)=$_[0]-.5; - $x < 0 and return 0; - return int 2**$x; + my ($x)=$_[0]; + $x < 1 and return 0; + return int 2**($x-1); } use Chart::LinesPoints; @@ -93,7 +90,7 @@ $obj->set ('legend_labels' => [@arch]); $obj->set ('f_y_tick' => \&ytick); $obj->set ('brush_size' => 3); - $obj->set ('pt_size' => 7); + $obj->set ('pt_size' => 3); $obj->set ('max_val' => $maxv+1); $obj->set ('max_y_ticks' => 30); $obj->set ('y_ticks' => int $maxv +1); @@ -159,7 +156,7 @@ $obj->set ('title' => "popularity-contest versions in use $title"); $obj->set ('legend_labels' => [@release]); $obj->set ('brush_size' => 3); - $obj->set ('pt_size' => 7); + $obj->set ('pt_size' => 3); $obj->set ('x_ticks' => 'vertical'); $obj->set ('skip_x_ticks' => $ticks); $obj->png ("$dirpng/release$pngname.png", \@data); diff -Nru popularity-contest-1.53ubuntu1/popularity-contest popularity-contest-1.54ubuntu1/popularity-contest --- popularity-contest-1.53ubuntu1/popularity-contest 2011-05-30 17:16:14.000000000 +0200 +++ popularity-contest-1.54ubuntu1/popularity-contest 2012-03-11 14:07:57.000000000 +0100 @@ -28,8 +28,6 @@ my $dpkg_batch_size=32; #This is a time/space trade-off: higher = faster my $popcon_conf="/etc/popularity-contest.conf"; -my %opts=(); - # $popcon_conf is in shell-script format my $HOSTID = qx(unset MY_HOSTID; . $popcon_conf; echo \$MY_HOSTID ); diff -Nru popularity-contest-1.53ubuntu1/README popularity-contest-1.54ubuntu1/README --- popularity-contest-1.53ubuntu1/README 2010-05-23 01:43:02.000000000 +0200 +++ popularity-contest-1.54ubuntu1/README 2011-10-12 11:28:37.000000000 +0200 @@ -121,7 +121,7 @@ FINDING THE SOURCE ================== -This package is being maintained in CVS using Alioth. The project summary +This package is being maintained in Subversion using Alioth. The project summary page is available from . The project home page is at .