1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-10-06 11:00:13 +02:00

Indicate if an app requires root privileges

This commit is contained in:
Henrik Tunedal 2011-03-08 16:13:46 +01:00
parent db579a4eba
commit 92a2022d2c
5 changed files with 14 additions and 0 deletions

5
README
View File

@ -223,3 +223,8 @@ index. This allows metadata to be retained while an application is temporarily
disabled from being published. The value should be a description of why the
application is disabled.
==Requires Root==
Set this optional field to "Yes" if the application requires root
privileges to be usable. This lets the client filter it out if the
user so desires.

View File

@ -57,6 +57,7 @@ def parse_metadata(metafile, **kw):
thisinfo['repo'] = ''
thisinfo['builds'] = []
thisinfo['usebuilt'] = False
thisinfo['requiresroot'] = False
mode = 0
buildline = []
for line in metafile:
@ -118,6 +119,9 @@ def parse_metadata(metafile, **kw):
elif field == "Use Built":
if value == "Yes":
thisinfo['usebuilt'] = True
elif field == "Requires Root":
if value == "Yes":
thisinfo['requiresroot'] = True
else:
print "Unrecognised field " + field + " in " + metafile.name
sys.exit(1)

View File

@ -7,5 +7,6 @@ Description:
An over-the-air updater for the CyanogenMod series of custom ROMs. Root
access is required.
.
Requires Root:Yes
Market Version:5.0.1
Market Version Code:501

View File

@ -11,6 +11,8 @@ NOTE: Root access is required to use this application.
.
Requires Root:Yes
Repo Type:svn
Repo:http://droidwall.googlecode.com/svn/trunk/

View File

@ -288,6 +288,8 @@ for app in apps:
addElement('marketvercode', app['marketvercode'], doc, apel)
if not (app['antifeatures'] is None):
addElement('antifeatures', app['antifeatures'], doc, apel)
if app['requiresroot']:
addElement('requirements', 'root', doc, apel)
# Sort the apk list into version order, just so the web site
# doesn't have to do any work by default...