deb822: support for "parsed" dependencies
Stefano Zacchiroli
zack at debian.org
Sat Jun 21 06:59:16 UTC 2008
On Fri, Jun 20, 2008 at 07:21:14PM +0200, Adeodato Simó wrote:
> Heh:
> http://git.debian.org/?p=tools-release/release.git;a=blob;f=scripts/dep-graph;h=7ad1c0ad164ff38ad890a7860c9d50dbe82479e8;hb=HEAD
>
> Which reminds me to ask: do you know about apt_pkg.ParseDepends? It does
> something similar:
Doh :-/ Of course I didn't know about the two ...
> >>> pprint.pprint(apt_pkg.ParseDepends(p.Section['Depends']))
> [[('dcoprss', '4:3.5.9-2', '>=')],
<snip>
> So it returns a 3-tuple instead of a dict, which may or may not be more
Beside the 3-tuple, it seems to me that it does not handle build-like
dependencies or at least not in an uniform manner, does it? With
"uniform" I mean returning a data structure which is the same for
runtime and buildtime dependencies, where I can extract the package name
with the same code for, say, a "Depends" and a "Build-Depends". This,
IMO, justify the need of a dict.
> As an aside, something seems to be broken on your branch at the moment?:
>
> >>> x['Depends']
> 'dcoprss (>= 4:3.5.9-2), kdenetwork-kfile-plugins (>= 4:3.5.9-2), kdict (>= 4:3.5.9-2), kdnssd (>= 4:3.5.9-2), kget (>= 4:3.5.9-2), knewsticker (>= 4:3.5.9-2), kopete (>= 4:3.5.9-2), kpf (>= 4:3.5.9-2), kppp (>= 4:3.5.9-2), krdc (>= 4:3.5.9-2), krfb (>= 4:3.5.9-2), ksirc (>= 4:3.5.9-2), kwifimanager (>= 4:3.5.9-2), librss1 (>= 4:3.5.9-2)'
Got any warning on standard error? It might well be that this fail to
parse as a dependency and I will check why, but:
- you should have got a warning
- you should have got a list of list of dictionaries anyhow, maybe with
a big string inside, but still the usual data structure
Can you please provide me data to reproduce this?
Now to the _important question_. I think this feature should be
mandatory for deb822. Either we turn the Recommends on python-debian to
a Depends and use ParseDepends (then we can discuss the better returned
data structure), or we use an alternative implementation like mine. What
do you prefer?
Cheers.
--
Stefano Zacchiroli -*- PhD in Computer Science \ PostDoc @ Univ. Paris 7
zack@{upsilon.cc,pps.jussieu.fr,debian.org} -<>- http://upsilon.cc/zack/
I'm still an SGML person,this newfangled /\ All one has to do is hit the
XML stuff is so ... simplistic -- Manoj \/ right keys at the right time
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-python-debian-discuss/attachments/20080621/92501268/attachment.pgp
More information about the pkg-python-debian-discuss
mailing list