Skip to content
Snippets Groups Projects
Commit a7b7c672 authored by Dylan Aïssi's avatar Dylan Aïssi
Browse files

Don't report missing packages on apt for packages no longer in an active Apertis release


Dashboard goes through all the packages in GitLab and reports
an error if they are not published in apt repositories. Unfortunately,
this behavior does not take into account the fact that packages can
be dropped in a release, so they are no longer published.
To fix that, don't report missing packages on apt for packages no
longer in an active Apertis release.

Signed-off-by: default avatarDylan Aïssi <dylan.aissi@collabora.com>
parent ec8aabb5
No related branches found
No related tags found
1 merge request!192Don't report missing packages on apt for packages no longer in an active Apertis release
Pipeline #669603 canceled
...@@ -1043,6 +1043,19 @@ class InvariantChecker: ...@@ -1043,6 +1043,19 @@ class InvariantChecker:
if not set(package).intersection({"git", "obs", "published"}): if not set(package).intersection({"git", "obs", "published"}):
return return
if "published" not in package: if "published" not in package:
if package.git.default_branch:
default_branch = package.git.default_branch
channels = set(package.git.branches).intersection(self.data.channels)
active_channels = [
name
for name in channels
if channel_is_active(self.data.channels[name])
]
if default_branch not in active_channels:
logging.info(
f"{package.name}: ignoring missing package on apt: no longer in an active Apertis release: {package.git.default_branch}"
)
return
self.error(package.name, Report.APT_PACKAGE_MISSING) self.error(package.name, Report.APT_PACKAGE_MISSING)
return return
if "obs" not in package: if "obs" not in package:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment