mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-05 18:50:09 +02:00
New field: Provides
This commit is contained in:
parent
c1b43ab9d4
commit
4935496f48
@ -461,6 +461,7 @@ The following sections describe the fields recognised within the file.
|
|||||||
* Categories::
|
* Categories::
|
||||||
* License::
|
* License::
|
||||||
* Name::
|
* Name::
|
||||||
|
* Provides::
|
||||||
* Auto Name::
|
* Auto Name::
|
||||||
* Web Site::
|
* Web Site::
|
||||||
* Source Code::
|
* Source Code::
|
||||||
@ -585,6 +586,17 @@ overridden using this. Note that this only overrides the name in the list of
|
|||||||
apps presented in the client; it doesn't changed the name or application label
|
apps presented in the client; it doesn't changed the name or application label
|
||||||
in the source code.
|
in the source code.
|
||||||
|
|
||||||
|
@node Provides
|
||||||
|
@section Provides
|
||||||
|
|
||||||
|
@cindex Provides
|
||||||
|
|
||||||
|
Comma-separated list of application IDs that this app provides. In other
|
||||||
|
words, if the user has any of these apps installed, F-Droid will show this app
|
||||||
|
as installed instead. It will also appear if the user clicks on urls linking
|
||||||
|
to the other app IDs. Useful when an app switches package name, or when you
|
||||||
|
want an app to act as multiple apps.
|
||||||
|
|
||||||
@node Web Site
|
@node Web Site
|
||||||
@section Web Site
|
@section Web Site
|
||||||
|
|
||||||
|
@ -472,6 +472,7 @@ def parse_metadata(metafile):
|
|||||||
|
|
||||||
# Defaults for fields that come from metadata...
|
# Defaults for fields that come from metadata...
|
||||||
thisinfo['Name'] = None
|
thisinfo['Name'] = None
|
||||||
|
thisinfo['Provides'] = None
|
||||||
thisinfo['Auto Name'] = ''
|
thisinfo['Auto Name'] = ''
|
||||||
thisinfo['Categories'] = 'None'
|
thisinfo['Categories'] = 'None'
|
||||||
thisinfo['Description'] = []
|
thisinfo['Description'] = []
|
||||||
@ -641,6 +642,8 @@ def write_metadata(dest, app):
|
|||||||
writefield('Disabled')
|
writefield('Disabled')
|
||||||
if app['AntiFeatures']:
|
if app['AntiFeatures']:
|
||||||
writefield('AntiFeatures')
|
writefield('AntiFeatures')
|
||||||
|
if app['Provides']:
|
||||||
|
writefield('Provides')
|
||||||
writefield('Categories')
|
writefield('Categories')
|
||||||
writefield('License')
|
writefield('License')
|
||||||
writefield('Web Site')
|
writefield('Web Site')
|
||||||
|
@ -71,6 +71,9 @@ def update_wiki(apps, apks):
|
|||||||
app['License'],
|
app['License'],
|
||||||
app.get('Requires Root', 'No'))
|
app.get('Requires Root', 'No'))
|
||||||
|
|
||||||
|
if app['Provides']:
|
||||||
|
wikidata += "This app provides: %s" % ', '.join(app['Summary'].split(','))
|
||||||
|
|
||||||
wikidata += app['Summary']
|
wikidata += app['Summary']
|
||||||
wikidata += " - [http://f-droid.org/repository/browse/?fdid=" + app['id'] + " view in repository]\n\n"
|
wikidata += " - [http://f-droid.org/repository/browse/?fdid=" + app['id'] + " view in repository]\n\n"
|
||||||
|
|
||||||
@ -580,6 +583,9 @@ def make_index(apps, apks, repodir, archive, categories):
|
|||||||
af.remove('UpstreamNonFree')
|
af.remove('UpstreamNonFree')
|
||||||
if af:
|
if af:
|
||||||
addElement('antifeatures', ','.join(af), doc, apel)
|
addElement('antifeatures', ','.join(af), doc, apel)
|
||||||
|
if app['Provides']:
|
||||||
|
pv = app['Provides'].split(',')
|
||||||
|
addElement('provides', ','.join(pv), doc, apel)
|
||||||
if app['Requires Root']:
|
if app['Requires Root']:
|
||||||
addElement('requirements', 'root', doc, apel)
|
addElement('requirements', 'root', doc, apel)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user