[Popcon-developers] question about "not in sid"-maintainer
- Subject: [Popcon-developers] question about "not in sid"-maintainer
- From: pere@hungry.com (Petter Reinholdtsen)
- Date: Tue Nov 1 17:54:50 2005
- Message-id: <[🔎] 2fl1x20uud0.fsf@saruman.uio.no>
- In-reply-to: <200508251208.08000.mail@venthur.de> (Bastian Venthur's message of "Thu, 25 Aug 2005 12:08:04 +0200")
- References: <200508251208.08000.mail@venthur.de>
[Bastian Venthur, 2005-08-25]
> Hi popcon-devs,
>
> I have quick question about the way popcon decides that a package is
> not in sid.
It looks at the package list in the mirror on the machine it is
running.
> I am currently not yet a DD but I already maintain a view packages
> which are officially in sid. When I -- courious as I am -- take my
> daily look at popcon.debian.org, i can see something like
>
> ...
> 15715 crystalcursors 15 0 0 0 15 (Not in sid)
> ...
>
> Crystalcursors is one of my packages and it *is* in sid, with me as
> maintainer. So I wonder, why my name does not appear? Is it, because
> I am not a real DD or it is a bug?
I had a closer look, and I believe this is because of a bug. The
uncompressed package lists are no longer in the mirror for sid, so the
'dists/unstable/*/binary-i386/Packages' glob do not match any files.
We need to teach the popanal.py script how to read the compressed
files instead. And we should do it in a way that works with python
2.1. Python 2.3 seem to have support for reading gzip files directly,
but I'm unable to get it to work with 2.1.
I'm not very skilled with the Python API. I'm trying this patch now,
but it does not work.
--- /var/lib/popcon/bin/popanal.py Sun Jul 31 21:29:59 2005
+++ /tmp/popanal.py Tue Nov 1 18:49:47 2005
@@ -4,6 +4,7 @@
# some statistics about it.
#
import sys, string, time, glob
+import gzip
def ewrite(s):
sys.stderr.write("%s\n" % s)
@@ -51,7 +52,7 @@
def read_depends(filename):
- file = open(filename, 'r')
+ file = GzipFile(filename, 'r')
package = None
while 1:
I get this error, indicating that the class does not exist:
Traceback (most recent call last):
File "/tmp/popanal.py", line 242, in ?
read_depends(d)
File "/tmp/popanal.py", line 55, in read_depends
file = GzipFile(filename, 'r')
NameError: global name 'GzipFile' is not defined
Anyone know the history of the GzipFile class? What is the best way
to read a gzip file using python 2.1?
Reply to: