mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-12 23:51:08 +00:00
Only display reverse dependency section when there are any
This commit is contained in:
parent
ce61a43a13
commit
ad463fb831
@ -103,7 +103,25 @@ def find_rdepends(package, releases, published_binaries):
|
|||||||
for release, relationship in appearences:
|
for release, relationship in appearences:
|
||||||
output += [' [ ] %s (%s)' % (release, relationship)]
|
output += [' [ ] %s (%s)' % (release, relationship)]
|
||||||
|
|
||||||
return '\n'.join(output)
|
found_any = sum(len(rdeps) for rdeps in intermediate.itervalues())
|
||||||
|
if found_any:
|
||||||
|
output = [
|
||||||
|
"Reverse dependencies:",
|
||||||
|
"=====================",
|
||||||
|
"The following reverse-dependencies need to be tested against the "
|
||||||
|
"new version of %(package)s. "
|
||||||
|
"For reverse-build-dependencies (-Indep), please test that the "
|
||||||
|
"package still builds against the new %(package)s. "
|
||||||
|
"For reverse-dependencies, please test that the version of the "
|
||||||
|
"package currently in the release still works with the new "
|
||||||
|
"%(package)s installed. "
|
||||||
|
"Reverse- Recommends, Suggests, and Enhances don't need to be "
|
||||||
|
"tested, and are listed for completeness-sake."
|
||||||
|
] + output
|
||||||
|
else:
|
||||||
|
output = ["No reverse dependencies"]
|
||||||
|
|
||||||
|
return output
|
||||||
|
|
||||||
|
|
||||||
def locate_package(package, distribution):
|
def locate_package(package, distribution):
|
||||||
@ -152,41 +170,30 @@ def request_backport(package_spph, source, destinations):
|
|||||||
'component': package_spph.getComponent(),
|
'component': package_spph.getComponent(),
|
||||||
'source': source,
|
'source': source,
|
||||||
'destinations': ', '.join(destinations),
|
'destinations': ', '.join(destinations),
|
||||||
'testing': '\n'.join(testing),
|
|
||||||
'rdepends': find_rdepends(package_spph, destinations,
|
|
||||||
published_binaries),
|
|
||||||
}
|
}
|
||||||
subject = ("Please backport %(package)s %(version)s (%(component)s) "
|
subject = ("Please backport %(package)s %(version)s (%(component)s) "
|
||||||
"from %(source)s" % subst)
|
"from %(source)s" % subst)
|
||||||
body = ("Please backport %(package)s %(version)s (%(component)s) "
|
body = ('\n'.join(
|
||||||
"from %(source)s to %(destinations)s.\n"
|
[
|
||||||
"\n"
|
"Please backport %(package)s %(version)s (%(component)s) "
|
||||||
"Reason for the backport:\n"
|
"from %(source)s to %(destinations)s.",
|
||||||
"========================\n"
|
"",
|
||||||
"<<< Enter your reasoning here >>>\n"
|
"Reason for the backport:",
|
||||||
"\n"
|
"========================",
|
||||||
"Testing:\n"
|
"<<< Enter your reasoning here >>>",
|
||||||
"========\n"
|
"",
|
||||||
"Mark off items in the checklist [X] as you test them, "
|
"Testing:",
|
||||||
"but please leave the checklist so that backporters can quickly "
|
"========",
|
||||||
"evaluate the state of testing.\n"
|
"Mark off items in the checklist [X] as you test them, "
|
||||||
"\n"
|
"but please leave the checklist so that backporters can quickly "
|
||||||
"%(testing)s\n"
|
"evaluate the state of testing.",
|
||||||
"\n"
|
""
|
||||||
"Reverse dependencies:\n"
|
]
|
||||||
"=====================\n"
|
+ testing
|
||||||
"The following reverse-dependencies need to be tested against the "
|
+ [""]
|
||||||
"new version of %(package)s. "
|
+ find_rdepends(package_spph, destinations, published_binaries)
|
||||||
"For reverse-build-dependencies (-Indep), please test that the "
|
+ [""]
|
||||||
"package still builds against the new %(package)s. "
|
) % subst)
|
||||||
"For reverse-dependencies, please test that the version of the "
|
|
||||||
"package currently in the release still works with the new "
|
|
||||||
"%(package)s installed. "
|
|
||||||
"Reverse- Recommends, Suggests, and Enhances don't need to be "
|
|
||||||
"tested, and are listed for completeness-sake."
|
|
||||||
"\n"
|
|
||||||
"%(rdepends)s\n"
|
|
||||||
% subst)
|
|
||||||
|
|
||||||
subject, body = edit_report(subject, body, changes_required=True)
|
subject, body = edit_report(subject, body, changes_required=True)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user