mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-14 00:21:08 +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:
|
||||
package = task.bug_target_name.split(" ")[0]
|
||||
if package == "ubuntu":
|
||||
# no source package was defined. Guessing that the second word in
|
||||
# the title is the package name
|
||||
package = bug.title.split(" ")[1]
|
||||
words = bug.title.split(" ")
|
||||
# no source package was defined. Guessing that the second or
|
||||
# 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:
|
||||
version = all_version
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user