From 5b868c8a4c75acdd784b900dff18198861a110ed Mon Sep 17 00:00:00 2001 From: Ciaran Gultnieks Date: Mon, 12 Jan 2015 18:58:03 +0000 Subject: [PATCH] Only set Auto Name if one isn't set already --- fdroidserver/checkupdates.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/fdroidserver/checkupdates.py b/fdroidserver/checkupdates.py index 97b7b7e1..25a8f3cf 100644 --- a/fdroidserver/checkupdates.py +++ b/fdroidserver/checkupdates.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- # # checkupdates.py - part of the FDroid server tools -# Copyright (C) 2010-13, Ciaran Gultnieks, ciaran@ciarang.com +# Copyright (C) 2010-2015, Ciaran Gultnieks, ciaran@ciarang.com # Copyright (C) 2013-2014 Daniel Martí # # This program is free software: you can redistribute it and/or modify @@ -353,17 +353,17 @@ def fetch_autoname(app, tag): if app['builds'][-1]['gradle']: flavours = app['builds'][-1]['gradle'] - logging.debug("...fetch auto name from " + app_dir) - new_name = common.fetch_real_name(app_dir, flavours) - commitmsg = None - if new_name: - logging.debug("...got autoname '" + new_name + "'") - if new_name != app['Auto Name']: + if not app['Auto Name']: + logging.debug("...fetch auto name from " + app_dir) + new_name = common.fetch_real_name(app_dir, flavours) + commitmsg = None + if new_name: + logging.debug("...got autoname '" + new_name + "'") app['Auto Name'] = new_name if not commitmsg: commitmsg = "Set autoname of {0}".format(common.getappname(app)) - else: - logging.debug("...couldn't get autoname") + else: + logging.debug("...couldn't get autoname") if app['Current Version'].startswith('@string/'): cv = common.version_name(app['Current Version'], app_dir, flavours)