Stuart Prescott writes:
> Control: tags -1 patch
>
>
> In [2]: def whatmade(name, cat):
> ...: p = [pkg for pkg in cat if pkg['Package'] == name][0]
> ...: print("Source %s/%s made binary %s/%s" % (
> ...: p.source,
> ...: p.source_version,
> ...: p[
Control: tags -1 patch
Hi David
Returning to your excellent idea in #9334273, how does the following seem? It
adds an accessor for the the `source` and `source_version` to the classes
generated by the deb822.Packages class:
In [1]: from debian import deb822
In [2]: def whatmade(name, cat):
David Bremner writes:
> def parse_source(string):
> matches=rex.match(string)
> if matches:
> return (matches.group(1),matches.group(2))
> else:
> return string
Probably return type polymorphism is a terrible idea in python. But I
guess you knew that. Maybe return (str
Stuart Prescott writes:
>
> Any opinions on whether it should return the data unparsed as
>
> source_package (version)
>
> or whether it should be clever enough to return a
>
> namedtuple(..., ['source', 'version'])
>
Hmm. I'm not (blush) familiar with named tuples. I was thinking
s
On Friday, 9 August 2019 09:42:02 AEST David Bremner wrote:
> Source: 0x (0.8-1)
>
> is a legit line in a Packages (and buildinfo) file, we should
> impliment a parser for that once, rather than letting everyone
> re-invent their own hack.
Yes, sounds very sensible.
Since that field is also
Package: python3-debian
Version: 0.1.35
Severity: wishlist
Since
Source: 0x (0.8-1)
is a legit line in a Packages (and buildinfo) file, we should
impliment a parser for that once, rather than letting everyone
re-invent their own hack.
-- System Information:
Debian Release: bullseye/sid
A
6 matches
Mail list logo