Browse Source

This commit was manufactured by cvs2svn to create tag

'debian_version_1_5'.
popcon-1.5
Alioth admins 19 years ago
parent
commit
574a20cdd5
  1. 6
      README
  2. 24
      debian/changelog
  3. 1
      debian/control
  4. 3
      debian/cron.weekly
  5. 3
      debian/rules
  6. 30
      popanal.py
  7. 4
      popularity-contest

6
README

@ -92,3 +92,9 @@ I periodically post survey results on my web page:
You can find some sample analysis scripts in
/usr/share/doc/popularity-contest as part of this package.
FINDING THE SOURCE
==================
This package is being maintained in CVS using Alioth. The project summary
page is available from <URL:https://alioth.debian.org/projects/popcon/>.

24
debian/changelog

@ -1,3 +1,27 @@
popularity-contest (1.5) unstable; urgency=low
* Set HOME to an existing directory before running
/usr/sbin/popularity-contest, to avoid access problems to ~root/. (Closes:
#212013)
-- Petter Reinholdtsen <pere@debian.org> Mon, 29 Sep 2003 23:32:01 +0200
popularity-contest (1.4) unstable; urgency=low
* Petter Reinholdtsen
- Adding myself as uploader.
- Add link to Alioth summary page in the README.
- Include architecture info in the submissions. (CLoses: #148756, #187736)
- Remove useless call to dh_undocumented, previously commented out
by Christian Perrier.
- Updated popanal.py to process the new arch info, and store
resulting summary in results.host_arch and
results.host_gnu_type.
* Acknowledge NMUs. (Closes: #135114, #135273, #136510, #137231,
#172824, #184608, #187871, #197178, #197230, #201704, #203841)
-- Petter Reinholdtsen <pere@debian.org> Sun, 14 Sep 2003 14:25:27 +0200
popularity-contest (1.3-1.3) unstable; urgency=low
* NMU again

1
debian/control

@ -2,6 +2,7 @@ Source: popularity-contest
Section: misc
Priority: optional
Maintainer: Avery Pennarun <apenwarr@debian.org>
Uploaders: Petter Reinholdtsen <pere@debian.org>
Build-Depends-Indep: debhelper (>=4.1.16)
Standards-Version: 3.6.1

3
debian/cron.weekly

@ -33,7 +33,8 @@ run_popcon()
echo "To: $MAILTO"
echo "Subject: popularity-contest submission"
echo
su nobody -pc "sh -c /usr/sbin/popularity-contest"
# Set HOME to avoid bug #212013.
HOME=/tmp su nobody -pc "sh -c /usr/sbin/popularity-contest"
}
do_sendmail()

3
debian/rules

@ -36,9 +36,6 @@ binary-indep: build install
dh_installcron
dh_installmanpages
dh_installdebconf
# C. Perrier for 1.3.1-1.2 : dh_undocumented is now useless and
# does nothing
#dh_undocumented
dh_installchangelogs
dh_strip
dh_compress

30
popanal.py

@ -34,6 +34,8 @@ sectlist = { UNKNOWN : [] }
deplist = {}
provlist = {}
complained = {}
host_arch_list = {}
host_gnu_type_list = {}
def parse_depends(depline):
@ -106,6 +108,9 @@ class Submission:
start_date = 0
host_arch = None
host_gnu_type = None
# initialize a new entry with known data
def __init__(self, version, owner_id, date):
self.entries = {}
@ -150,6 +155,15 @@ class Submission:
sectlist[UNKNOWN].append(package)
votelist[package].vote_for(package, self.entries[package])
if not host_arch_list.has_key(self.host_arch):
host_arch_list[self.host_arch] = 1
else:
host_arch_list[self.host_arch] = host_arch_list[self.host_arch] + 1
if not host_gnu_type_list.has_key(self.host_gnu_type):
host_gnu_type_list[self.host_gnu_type] = 1
else:
host_gnu_type_list[self.host_gnu_type] = host_gnu_type_list[self.host_gnu_type] + 1
def headersplit(pairs):
header = {}
@ -183,6 +197,12 @@ def read_submissions(stream):
subcount = subcount + 1
ewrite('#%s' % subcount)
e = Submission(0, header['ID'], header['TIME'])
if header.has_key('DEB_HOST_ARCH'):
e.host_arch = header['DEB_HOST_ARCH']
if header.has_key('DEB_HOST_GNU_TYPE'):
e.host_gnu_type = header['DEB_HOST_GNU_TYPE']
elif split[0]=='END-POPULARITY-CONTEST-0' and e != None:
header = headersplit(split[1:])
@ -224,3 +244,13 @@ for section in sectlist.keys():
out.write("%-30s %5d %5d %5d %5d\n"
% (package, fv.yes, fv.old_unused,
fv.too_recent, fv.empty_package))
out = open('results.host_arch', 'w')
for host_arch in host_arch_list.keys():
out.write("%-30s %5d\n"
% (host_arch, host_arch_list[host_arch]))
out = open('results.host_gnu_type', 'w')
for host_gnu_type in host_gnu_type_list.keys():
out.write("%-30s %5d\n"
% (host_gnu_type, host_gnu_type_list[host_gnu_type]))

4
popularity-contest

@ -19,6 +19,8 @@ fi
DI=/var/lib/dpkg/info
PACKAGES=$(dpkg-awk "Status: .* installed" -- Package \
| grep '^Package:' | sed 's/^Package: //')
DEB_HOST_ARCH=`dpkg --print-architecture`
DEB_HOST_GNU_TYPE=`dpkg-architecture -qDEB_HOST_GNU_TYPE`
# Now, for each package, get the list of FILES that we are interested in,
# producing output lines of the format "atime ctime package pathname".
@ -78,6 +80,6 @@ done | gawk '
# add a header/footer.
( echo "POPULARITY-CONTEST-0" "TIME:$(date +%s)" \
"ID:$MY_HOSTID"
"ID:$MY_HOSTID DEB_HOST_ARCH:$DEB_HOST_ARCH DEB_HOST_GNU_TYPE:$DEB_HOST_GNU_TYPE"
sort -n -r;
echo "END-POPULARITY-CONTEST-0" "TIME:$(date +%s)" )

Loading…
Cancel
Save