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

Don't report a broken watch file when uscan reports the package is up to date.


When uscan reports a package is up to date, its return code is 1,
which is interpreted as an issue with uscan/watch by the dashboard.
So, before returning an issue for this package, check if the
output of uscan contains "Package is up to date".

Signed-off-by: default avatarDylan Aïssi <dylan.aissi@collabora.com>
parent e1bcd613
No related branches found
No related tags found
1 merge request!199Don't report a broken watch file when uscan reports the package is up to date
Pipeline #684442 passed
......@@ -154,15 +154,23 @@ def compute_updates(data):
logging.warning(
f"{package.name}: uscan issue: {p.stderr.strip().decode()}"
)
p_stdout = p.stdout.strip().decode()
if p.returncode != 0:
warning(
package.name,
Report.UPDATE_USCAN_WATCH_ISSUE,
branch=package.git["default_branch"],
is_up_to_date = re.findall(
r".*Package is up to date from.*", p_stdout
)
if is_up_to_date:
logging.info(
f"Package {package.name} is up-to-date according to its debian/watch file"
)
else:
warning(
package.name,
Report.UPDATE_USCAN_WATCH_ISSUE,
branch=package.git["default_branch"],
)
return newver, newurl
p_stdout = p.stdout.strip().decode()
newver = re.findall(r"\$newversion .*", p_stdout)[0]
newver = newver.split()[-1]
newurl = re.findall(r"Upstream URL.*", p_stdout)[0]
......
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