mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-03 17:50:11 +02:00
import: standardize on 'appid' var name for Application ID
The rest of the fdroidserver code uses 'appid' or 'packageName'. The official Android name is "Application ID". "Package Name" is the Java term, and it is used in Android in Java code.
This commit is contained in:
parent
2858c73b87
commit
960d31af2a
@ -127,9 +127,9 @@ def main():
|
||||
paths = common.get_all_gradle_and_manifests(tmp_importer_dir)
|
||||
subdir = common.get_gradle_subdir(tmp_importer_dir, paths)
|
||||
if paths:
|
||||
versionName, versionCode, package = common.parse_androidmanifests(paths, app)
|
||||
if not package:
|
||||
raise FDroidException(_("Couldn't find package ID"))
|
||||
versionName, versionCode, appid = common.parse_androidmanifests(paths, app)
|
||||
if not appid:
|
||||
raise FDroidException(_("Couldn't find Application ID"))
|
||||
if not versionName:
|
||||
logging.warning(_('Could not find latest version name'))
|
||||
if not versionCode:
|
||||
@ -138,8 +138,8 @@ def main():
|
||||
raise FDroidException(_("No gradle project could be found. Specify --subdir?"))
|
||||
|
||||
# Make sure it's actually new...
|
||||
if package in apps:
|
||||
raise FDroidException("Package " + package + " already exists")
|
||||
if appid in apps:
|
||||
raise FDroidException(_('Package "{appid}" already exists').format(appid=appid))
|
||||
|
||||
# Create a build line...
|
||||
build.versionName = versionName or 'Unknown'
|
||||
@ -205,17 +205,17 @@ def main():
|
||||
# Keep the repo directory to save bandwidth...
|
||||
if not os.path.exists('build'):
|
||||
os.mkdir('build')
|
||||
build_dir = os.path.join('build', package)
|
||||
build_dir = os.path.join('build', appid)
|
||||
if os.path.exists(build_dir):
|
||||
logging.warning(_('{path} already exists, ignoring import results!')
|
||||
.format(path=build_dir))
|
||||
sys.exit(1)
|
||||
elif tmp_importer_dir is not None:
|
||||
shutil.move(tmp_importer_dir, build_dir)
|
||||
with open('build/.fdroidvcs-' + package, 'w') as f:
|
||||
with open('build/.fdroidvcs-' + appid, 'w') as f:
|
||||
f.write(app.RepoType + ' ' + app.Repo)
|
||||
|
||||
metadatapath = os.path.join('metadata', package + '.yml')
|
||||
metadatapath = os.path.join('metadata', appid + '.yml')
|
||||
metadata.write_metadata(metadatapath, app)
|
||||
logging.info("Wrote " + metadatapath)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user