17
class UbuntuMaintenance(object):
18
""" Represents the support timeframe for a regular ubuntu release """
20
# architectures that are full supported (including LTS time)
26
# architectures we support (but not for LTS time)
27
SUPPORTED_ARCHES = PRIMARY_ARCHES + ["armel"]
29
# what defines the seeds is documented in wiki.ubuntu.com/SeedManagement
37
"supported-desktop-extra",
39
SUPPORTED_SEEDS = ["all"]
41
# normal support timeframe
44
("18m", SUPPORTED_SEEDS),
47
# distro names that we check the seeds for
19
53
# This is fun! We have a bunch of cases for 10.04 LTS
21
55
# - distro "ubuntu" follows SUPPORT_TIMEFRAME_LTS but only for
24
58
# considered *but* only follow SUPPORT_TIMEFRAME
25
59
# - anything that is in armel follows SUPPORT_TIMEFRAME
28
# codename of the lts releases
29
LTS_RELEASES = ["dapper", "hardy", "lucid"]
31
# architectures that are full supported (including LTS time)
32
PRIMARY_ARCHES = ["i386", "amd64"]
34
# architectures we support (but not for LTS time)
35
SUPPORTED_ARCHES = PRIMARY_ARCHES + ["armel"]
37
# what defines the seeds is documented in wiki.ubuntu.com/SeedManagement
38
SERVER_SEEDS = ["supported-server", "server-ship"]
39
DESKTOP_SEEDS = ["ship", "supported-desktop", "supported-desktop-extra"]
40
SUPPORTED_SEEDS = ["all"]
42
# normal support timeframe
45
("18m", SUPPORTED_SEEDS),
48
# lts support timeframe
50
SUPPORT_TIMEFRAME_LTS = [
52
("3y", DESKTOP_SEEDS),
53
("18m", SUPPORTED_SEEDS),
56
# distro names and if they get LTS support (order is important)
57
DISTRO_NAMES_AND_LTS_SUPPORT = [
61
class LucidUbuntuMaintenance(UbuntuMaintenance):
62
""" Represents the support timeframe for a 10.04 (lucid) LTS release,
63
the exact rules differ from LTS release to LTS release
66
# lts support timeframe, order is important, least supported must be last
69
("5y", UbuntuMaintenance.SERVER_SEEDS),
70
("3y", UbuntuMaintenance.DESKTOP_SEEDS),
71
("18m", UbuntuMaintenance.SUPPORTED_SEEDS),
74
# on a LTS this is significant, it defines what names get LTS support
81
class PreciseUbuntuMaintenance(UbuntuMaintenance):
82
""" The support timeframe for the 12.04 (precise) LTS release.
83
This changes the timeframe for desktop packages from 3y to 5y
86
# lts support timeframe, order is important, least supported must be last
89
("5y", UbuntuMaintenance.SERVER_SEEDS),
90
("5y", UbuntuMaintenance.DESKTOP_SEEDS),
91
("18m", UbuntuMaintenance.SUPPORTED_SEEDS),
94
# on a LTS this is significant, it defines what names get LTS support
63
100
# Names of the distribution releases that are not supported by this
64
101
# tool. All later versions are supported.
338
381
# get dicts of pkgname -> support timeframe string
339
support_timeframe = SUPPORT_TIMEFRAME
340
if lts_supported and distro in LTS_RELEASES:
341
support_timeframe = SUPPORT_TIMEFRAME_LTS
343
support_timeframe = SUPPORT_TIMEFRAME
382
support_timeframe = ubuntu_maintenance.SUPPORT_TIMEFRAME
344
383
get_packages_support_time(
345
384
structure, name, pkg_support_time, support_timeframe)
347
386
# now go over the bits in main that we have not seen (because
348
387
# they are not in any seed and got added manually into "main"
349
for arch in PRIMARY_ARCHES:
388
for arch in ubuntu_maintenance.PRIMARY_ARCHES:
350
389
rootdir = "./aptroot.%s" % distro
351
390
apt_pkg.config.set("APT::Architecture", arch)
352
391
cache = apt.Cache(rootdir=rootdir)
404
446
# go over the supported arches, they are divided in
405
447
# first-class (PRIMARY) and second-class with different
407
for arch in SUPPORTED_ARCHES:
449
for arch in ubuntu_maintenance.SUPPORTED_ARCHES:
408
450
# ensure we do not overwrite arch-specific overwrites
409
451
pkgname_and_arch = "%s/%s" % (pkgname, arch)
410
452
if pkgname_and_arch in pkg_support_time:
412
if arch in PRIMARY_ARCHES:
454
if arch in ubuntu_maintenance.PRIMARY_ARCHES:
413
455
# arch with full LTS support
414
456
print "%s %s %s" % (
415
457
pkgname_and_arch, SUPPORT_TAG,