mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-03-13 20:31:12 +00:00
Make binary packages a namedtuple
Signed-off-by: Niels Thykier <niels@thykier.net>
This commit is contained in:
parent
7230cd29c0
commit
4eebb5180f
19
britney.py
19
britney.py
@ -188,7 +188,7 @@ import optparse
|
||||
|
||||
import apt_pkg
|
||||
|
||||
from collections import defaultdict
|
||||
from collections import defaultdict, namedtuple
|
||||
from functools import reduce
|
||||
from itertools import chain, product
|
||||
from operator import attrgetter
|
||||
@ -227,6 +227,19 @@ check_field_name = dict((globals()[fn], fn) for fn in
|
||||
|
||||
check_fields = sorted(check_field_name)
|
||||
|
||||
BinaryPackage = namedtuple('BinaryPackage', [
|
||||
'version',
|
||||
'section',
|
||||
'source',
|
||||
'source_version',
|
||||
'architecture',
|
||||
'multi_arch',
|
||||
'depends',
|
||||
'conflicts',
|
||||
'provides',
|
||||
'is_essential',
|
||||
])
|
||||
|
||||
class Britney(object):
|
||||
"""Britney, the Debian testing updater script
|
||||
|
||||
@ -702,7 +715,7 @@ class Britney(object):
|
||||
else:
|
||||
provides = []
|
||||
|
||||
dpkg = [version,
|
||||
dpkg = BinaryPackage(version,
|
||||
intern(get_field('Section')),
|
||||
source,
|
||||
source_version,
|
||||
@ -712,7 +725,7 @@ class Britney(object):
|
||||
', '.join(final_conflicts_list) or None,
|
||||
provides,
|
||||
ess,
|
||||
]
|
||||
)
|
||||
|
||||
# if the source package is available in the distribution, then register this binary package
|
||||
if source in srcdist:
|
||||
|
Loading…
x
Reference in New Issue
Block a user