mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-05-17 11:51:29 +00:00
Tweak log levels, use error when bailing out because of blacklisting, and normal for everything else blacklist-related
This commit is contained in:
parent
e47bff4bed
commit
ec13baee65
43
syncpackage
43
syncpackage
@ -135,7 +135,7 @@ def sync_dsc(src_pkg, debian_dist, release, name, email, bugs, ubuntu_mirror,
|
|||||||
ubuntu_ver = Version('~')
|
ubuntu_ver = Version('~')
|
||||||
ubu_pkg = None
|
ubu_pkg = None
|
||||||
need_orig = True
|
need_orig = True
|
||||||
Logger.info('%s does not exist in Ubuntu.', name)
|
Logger.normal('%s does not exist in Ubuntu.', name)
|
||||||
|
|
||||||
Logger.debug('Source %s: current version %s, new version %s',
|
Logger.debug('Source %s: current version %s, new version %s',
|
||||||
src_pkg.source, ubuntu_ver, new_ver)
|
src_pkg.source, ubuntu_ver, new_ver)
|
||||||
@ -589,28 +589,39 @@ def main():
|
|||||||
|
|
||||||
blacklisted, comments = is_blacklisted(src_pkg.source)
|
blacklisted, comments = is_blacklisted(src_pkg.source)
|
||||||
if blacklisted:
|
if blacklisted:
|
||||||
Logger.error("Source package %s is blacklisted.", src_pkg.source)
|
fail = False
|
||||||
if comments:
|
message = ""
|
||||||
Logger.error(u"Blacklist Comments: %s", comments)
|
|
||||||
|
|
||||||
if blacklisted == 'CURRENT':
|
if blacklisted == 'CURRENT':
|
||||||
if options.force:
|
if options.force:
|
||||||
Logger.warn(u"Forcing override of temporary blacklising.")
|
message = "Forcing override of temporary blacklising."
|
||||||
else:
|
else:
|
||||||
Logger.error("The blacklisting only applies to the current "
|
fail = True
|
||||||
"versions in Debian and Ubuntu.")
|
message = ("The blacklisting only applies to the current "
|
||||||
Logger.error("--force is required to override the blacklist.")
|
"versions in Debian and Ubuntu. --force is "
|
||||||
sys.exit(1)
|
"required to override the blacklist.")
|
||||||
else:
|
else:
|
||||||
Logger.error("If you think this package shouldn't be blacklisted, "
|
|
||||||
"please file a bug explaining your reasoning and "
|
|
||||||
"subscribe ~ubuntu-archive.")
|
|
||||||
if options.force and not options.lp:
|
if options.force and not options.lp:
|
||||||
Logger.warn(u"Forcing fake-sync, overriding blacklist.")
|
message = "Forcing fake-sync, overriding blacklist."
|
||||||
else:
|
else:
|
||||||
Logger.error("--force and --no-lp are required to override the "
|
fail = True
|
||||||
"blacklist, if this package needs a fakesync.")
|
message = ("--force and --no-lp are required to override the "
|
||||||
sys.exit(1)
|
"blacklist, if this package needs a fakesync.")
|
||||||
|
message += ("\nIf you think this package shouldn't be blacklisted, "
|
||||||
|
"please file a bug explaining your reasoning and "
|
||||||
|
"subscribe ~ubuntu-archive.")
|
||||||
|
|
||||||
|
if fail:
|
||||||
|
Logger.error(u"Source package %s is blacklisted.", src_pkg.source)
|
||||||
|
else:
|
||||||
|
Logger.normal(u"Source package %s is blacklisted.", src_pkg.source)
|
||||||
|
|
||||||
|
if comments:
|
||||||
|
Logger.normal(u"Blacklist Comments: %s", comments)
|
||||||
|
if message:
|
||||||
|
Logger.normal(message)
|
||||||
|
if fail:
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
if options.lp:
|
if options.lp:
|
||||||
copy(src_pkg, options.release, options.bugs, options.simulate,
|
copy(src_pkg, options.release, options.bugs, options.simulate,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user