diff --git a/fdroidserver/common.py b/fdroidserver/common.py index b2e9bcf5..022be563 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -119,7 +119,6 @@ default_config = { 'mvn3': "mvn", 'gradle': os.path.join(FDROID_PATH, 'gradlew-fdroid'), 'gradle_version_dir': os.path.join(os.path.join(os.getenv('HOME'), '.cache', 'fdroidserver'), 'gradle'), - 'accepted_formats': ['yml'], 'sync_from_local_copy_dir': False, 'allow_disabled_algorithms': False, 'per_app_repos': False, diff --git a/fdroidserver/lint.py b/fdroidserver/lint.py index cf6a1119..8fafc7a0 100644 --- a/fdroidserver/lint.py +++ b/fdroidserver/lint.py @@ -515,16 +515,12 @@ def check_for_unsupported_metadata_files(basedir=""): global config return_value = False - formats = config['accepted_formats'] for f in glob.glob(basedir + 'metadata/*') + glob.glob(basedir + 'metadata/.*'): if os.path.isdir(f): - exists = False - for t in formats: - exists = exists or os.path.exists(f + '.' + t) - if not exists: + if not os.path.exists(f + '.yml'): print(_('"%s/" has no matching metadata file!') % f) return_value = True - elif os.path.splitext(f)[1][1:] in formats: + elif os.path.splitext(f)[1][1:] == "yml": packageName = os.path.splitext(os.path.basename(f))[0] if not common.is_valid_package_name(packageName): print('"' + packageName + '" is an invalid package name!\n' @@ -532,7 +528,7 @@ def check_for_unsupported_metadata_files(basedir=""): return_value = True else: print('"' + f.replace(basedir, '') - + '" is not a supported file format: (' + ','.join(formats) + ')') + + '" is not a supported file format (use: .yml)') return_value = True return return_value diff --git a/fdroidserver/metadata.py b/fdroidserver/metadata.py index ffc5edf7..2498bb32 100644 --- a/fdroidserver/metadata.py +++ b/fdroidserver/metadata.py @@ -928,10 +928,6 @@ def parse_metadata(metadatapath, check_vcs=False, refresh=True): '''parse metadata file, optionally checking the git repo for metadata first''' _ignored, ext = fdroidserver.common.get_extension(metadatapath) - accepted = fdroidserver.common.config['accepted_formats'] - if ext not in accepted: - warn_or_exception(_('"{path}" is not an accepted format, convert to: {formats}') - .format(path=metadatapath, formats=', '.join(accepted))) app = App() app.metadatapath = metadatapath @@ -1172,10 +1168,6 @@ build_cont = re.compile(r'^[ \t]') def write_metadata(metadatapath, app): _ignored, ext = fdroidserver.common.get_extension(metadatapath) - accepted = fdroidserver.common.config['accepted_formats'] - if ext not in accepted: - warn_or_exception(_('Cannot write "{path}", not an accepted format, use: {formats}') - .format(path=metadatapath, formats=', '.join(accepted))) if ext == 'yml': if importlib.util.find_spec('ruamel.yaml'): diff --git a/fdroidserver/nightly.py b/fdroidserver/nightly.py index f9a1f787..cedf29a4 100644 --- a/fdroidserver/nightly.py +++ b/fdroidserver/nightly.py @@ -248,7 +248,6 @@ Last updated: {date}'''.format(repo_git_base=repo_git_base, config += "keypass = '%s'\n" % PASSWORD config += "keydname = '%s'\n" % DISTINGUISHED_NAME config += "make_current_version_link = False\n" - config += "accepted_formats = ['yml']\n" config += "update_stats = True\n" with open('config.py', 'w') as fp: fp.write(config)