mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-05-09 07:51:28 +00:00
ack-sync: Improve source package name guessing.
This commit is contained in:
parent
dcaab5fc47
commit
cf1939605e
11
ack-sync
11
ack-sync
@ -166,9 +166,14 @@ def main(bug_numbers, all_package, all_version, all_section, update,
|
|||||||
else:
|
else:
|
||||||
package = task.bug_target_name.split(" ")[0]
|
package = task.bug_target_name.split(" ")[0]
|
||||||
if package == "ubuntu":
|
if package == "ubuntu":
|
||||||
# no source package was defined. Guessing that the second word in
|
words = bug.title.split(" ")
|
||||||
# the title is the package name
|
# no source package was defined. Guessing that the second or
|
||||||
package = bug.title.split(" ")[1]
|
# third word in the title is the package name, because most
|
||||||
|
# titles start with "Please sync <package>" or "Sync <package>"
|
||||||
|
if words[0].lower() == "please":
|
||||||
|
package = words[2]
|
||||||
|
else:
|
||||||
|
package = words[1]
|
||||||
if all_version is not None:
|
if all_version is not None:
|
||||||
version = all_version
|
version = all_version
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user