It wasn't clear what the option does, and why it need to be on the command line, so the replacement is a 'global_maintainer_override' config file setting which does the same thing, in a cleaner fashion.
Signed-off-by: Alexander Kanavin <alexander.kana...@linux.intel.com> --- README | 7 ++++++- upgradehelper.py | 9 +++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/README b/README index 00a390a..20b2e5d 100644 --- a/README +++ b/README @@ -28,6 +28,7 @@ Setup --------------- snip --------------- [maintainer_override] # mails for recipe upgrades will go to john.doe instead of jane.doe, etc +# see also the global_maintainer_override option jane....@doe.com=john....@doe.com johhny.br...@bravo.com=john....@doe.com @@ -38,6 +39,10 @@ blacklist=python glibc gcc # only recipes belonging to maintainers in whitelist will be attempted maintainers_whitelist=jane....@doe.com john....@doe.com johhny.br...@bravo.com +# email for all recipe upgrades will go to john.doe, except those listed +# in specific maintainer_override entries above +global_maintainer_override=john....@doe.com + # SMTP server smtp=smtp.my-server.com:25 @@ -84,7 +89,7 @@ INHERIT =+ "distrodata" WARNING: if you are using the default maintainers.inc file supplied with Poky (in meta-yocto) and you don't set a - maintainers_whitelist or maintainer_override in the + maintainers_whitelist or (global_)maintainer_override in the upgrade-helper configuration as above, and you specify "all" on the command line, the script will automatically send out emails to the default maintainers. Please be careful not to diff --git a/upgradehelper.py b/upgradehelper.py index d5a7112..4623199 100755 --- a/upgradehelper.py +++ b/upgradehelper.py @@ -79,8 +79,6 @@ def parse_cmdline(): parser.add_argument("-t", "--to_version", help="version to upgrade the recipe to") - parser.add_argument("-m", "--maintainer", - help="maintainer of the recipe") parser.add_argument("-d", "--debug-level", type=int, default=4, choices=range(1, 6), help="set the debug level: CRITICAL=1, ERROR=2, WARNING=3, INFO=4, DEBUG=5") @@ -325,6 +323,8 @@ class Updater(object): if pkg_ctx['MAINTAINER'] in maintainer_override: to_addr = maintainer_override[pkg_ctx['MAINTAINER']] + elif 'global_maintainer_override' in settings: + to_addr = settings['global_maintainer_override'] else: to_addr = pkg_ctx['MAINTAINER'] @@ -677,10 +677,7 @@ class UniverseUpdater(Updater): next_ver = row[2] status = row[11] revision = row[12] - if self.args.maintainer: - maintainer = self.args.maintainer - else: - maintainer = row[14] + maintainer = row[14] no_upgrade_reason = row[15] if status == 'UPDATE' and not no_upgrade_reason: -- 2.15.1 -- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto