mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-05 18:50:09 +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)
|
paths = common.get_all_gradle_and_manifests(tmp_importer_dir)
|
||||||
subdir = common.get_gradle_subdir(tmp_importer_dir, paths)
|
subdir = common.get_gradle_subdir(tmp_importer_dir, paths)
|
||||||
if paths:
|
if paths:
|
||||||
versionName, versionCode, package = common.parse_androidmanifests(paths, app)
|
versionName, versionCode, appid = common.parse_androidmanifests(paths, app)
|
||||||
if not package:
|
if not appid:
|
||||||
raise FDroidException(_("Couldn't find package ID"))
|
raise FDroidException(_("Couldn't find Application ID"))
|
||||||
if not versionName:
|
if not versionName:
|
||||||
logging.warning(_('Could not find latest version name'))
|
logging.warning(_('Could not find latest version name'))
|
||||||
if not versionCode:
|
if not versionCode:
|
||||||
@ -138,8 +138,8 @@ def main():
|
|||||||
raise FDroidException(_("No gradle project could be found. Specify --subdir?"))
|
raise FDroidException(_("No gradle project could be found. Specify --subdir?"))
|
||||||
|
|
||||||
# Make sure it's actually new...
|
# Make sure it's actually new...
|
||||||
if package in apps:
|
if appid in apps:
|
||||||
raise FDroidException("Package " + package + " already exists")
|
raise FDroidException(_('Package "{appid}" already exists').format(appid=appid))
|
||||||
|
|
||||||
# Create a build line...
|
# Create a build line...
|
||||||
build.versionName = versionName or 'Unknown'
|
build.versionName = versionName or 'Unknown'
|
||||||
@ -205,17 +205,17 @@ def main():
|
|||||||
# Keep the repo directory to save bandwidth...
|
# Keep the repo directory to save bandwidth...
|
||||||
if not os.path.exists('build'):
|
if not os.path.exists('build'):
|
||||||
os.mkdir('build')
|
os.mkdir('build')
|
||||||
build_dir = os.path.join('build', package)
|
build_dir = os.path.join('build', appid)
|
||||||
if os.path.exists(build_dir):
|
if os.path.exists(build_dir):
|
||||||
logging.warning(_('{path} already exists, ignoring import results!')
|
logging.warning(_('{path} already exists, ignoring import results!')
|
||||||
.format(path=build_dir))
|
.format(path=build_dir))
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
elif tmp_importer_dir is not None:
|
elif tmp_importer_dir is not None:
|
||||||
shutil.move(tmp_importer_dir, build_dir)
|
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)
|
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)
|
metadata.write_metadata(metadatapath, app)
|
||||||
logging.info("Wrote " + metadatapath)
|
logging.info("Wrote " + metadatapath)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user