diff options
author | 2017-03-21 04:28:12 +0200 | |
---|---|---|
committer | 2017-03-21 04:28:12 +0200 | |
commit | 56b597912e36dce997598642465a2322e6b11c7d (patch) | |
tree | af06db703359575cccbbe3cc39e03f82bcd37e99 | |
parent | gnome: add libgfbgraph reverse mapping as well (diff) | |
download | gentoo-bumpchecker-56b597912e36dce997598642465a2322e6b11c7d.tar.gz gentoo-bumpchecker-56b597912e36dce997598642465a2322e6b11c7d.tar.bz2 gentoo-bumpchecker-56b597912e36dce997598642465a2322e6b11c7d.zip |
gnome: Track upstream core vs apps suite handling and show it in the output
-rw-r--r-- | modules/gnome_module.py | 4 | ||||
-rw-r--r-- | modules/gnome_output.py | 4 | ||||
-rw-r--r-- | modules/package_module.py | 6 |
3 files changed, 10 insertions, 4 deletions
diff --git a/modules/gnome_module.py b/modules/gnome_module.py index 7f162dd..1780b92 100644 --- a/modules/gnome_module.py +++ b/modules/gnome_module.py @@ -66,7 +66,7 @@ class GNOME: # Skip mobile stuff, because we don't care. And they are mostly dupes anyway if components[0] == 'mobile': continue - pkg = package_module.Package(components[1] + "-" + components[2]) + pkg = package_module.Package(components[1] + "-" + components[2], suite=components[0]) if (pkg.name and pkg.version): ret.append(pkg) else: @@ -172,6 +172,6 @@ def compare_packages(release_packages, latest_packages, packages_in_portage): " | lp: " + str(latest_package.version) + " | status: " + str(status)) - status_packages.append(package_module.PackageStatus(release_package.name, str(portage_package.version), str(release_package.version), str(latest_package.version), status)) + status_packages.append(package_module.PackageStatus(release_package.name, str(portage_package.version), str(release_package.version), str(latest_package.version), status, suite=release_package.suite)) return status_packages diff --git a/modules/gnome_output.py b/modules/gnome_output.py index 19b6da0..6f0f6be 100644 --- a/modules/gnome_output.py +++ b/modules/gnome_output.py @@ -74,8 +74,12 @@ class Output: lines.append("<th>Package Name</th><th>Portage Version</th><th>Official Version</th><th>Latest Version</th>") lines.append('</tr>') + current_suite = None # data for package in self.packages: + if package.suite != current_suite: + current_suite = package.suite + lines.append('<tr><td colspan="4" align="center"><b>%s</b></td></tr>' % current_suite.capitalize()) if package.status == package_module.Status.NeedUpdate: lines.append('<tr bgcolor="#FF8A75">') # "red" elif package.status == package_module.Status.Compliant: diff --git a/modules/package_module.py b/modules/package_module.py index 53e3018..30f79a2 100644 --- a/modules/package_module.py +++ b/modules/package_module.py @@ -39,8 +39,9 @@ class Package(object): "vte":"x11-libs/vte", } - def __init__(self, raw_data): + def __init__(self, raw_data, suite=None): self.raw_string = raw_data + self.suite = suite self.name = None self.version = None @@ -91,7 +92,7 @@ class Package(object): return self.name_plus_version class PackageStatus: - def __init__(self, name, portage_version, gnome_version, latest_version, status, stable_version = False): + def __init__(self, name, portage_version, gnome_version, latest_version, status, stable_version = False, suite=None): self.name = name if stable_version is not False: self.stable_version = stable_version @@ -99,6 +100,7 @@ class PackageStatus: self.gnome_version = gnome_version self.latest_version = latest_version self.status = status + self.suite = suite class Status(object): def Compliant(self): |