From 92a2022d2cf64b3fc3120514c687dc40502b9e78 Mon Sep 17 00:00:00 2001 From: Henrik Tunedal Date: Tue, 8 Mar 2011 16:13:46 +0100 Subject: [PATCH] Indicate if an app requires root privileges --- README | 5 +++++ common.py | 4 ++++ metadata/cmupdaterapp.ui.txt | 1 + metadata/com.googlecode.droidwall.txt | 2 ++ update.py | 2 ++ 5 files changed, 14 insertions(+) diff --git a/README b/README index 75466c8e..e59cbece 100644 --- a/README +++ b/README @@ -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. diff --git a/common.py b/common.py index b66e04a8..d661e884 100644 --- a/common.py +++ b/common.py @@ -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) diff --git a/metadata/cmupdaterapp.ui.txt b/metadata/cmupdaterapp.ui.txt index 2de3f446..bec24a5f 100644 --- a/metadata/cmupdaterapp.ui.txt +++ b/metadata/cmupdaterapp.ui.txt @@ -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 diff --git a/metadata/com.googlecode.droidwall.txt b/metadata/com.googlecode.droidwall.txt index 16151b47..9383a631 100644 --- a/metadata/com.googlecode.droidwall.txt +++ b/metadata/com.googlecode.droidwall.txt @@ -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/ diff --git a/update.py b/update.py index d317e42a..fe18354b 100755 --- a/update.py +++ b/update.py @@ -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... -- 2.30.2