chiark / gitweb /
Indicate if an app requires root privileges
authorHenrik Tunedal <tunedal@gmail.com>
Tue, 8 Mar 2011 15:13:46 +0000 (16:13 +0100)
committerHenrik Tunedal <tunedal@gmail.com>
Tue, 8 Mar 2011 23:16:53 +0000 (00:16 +0100)
README
common.py
metadata/cmupdaterapp.ui.txt
metadata/com.googlecode.droidwall.txt
update.py

diff --git a/README b/README
index 75466c8e12d344f91ea130cb04b17066764a2157..e59cbeced8dd5b7609b04ed9fa5bb7fe837c7081 100644 (file)
--- 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.
index b66e04a8bfd4f2af6ba9854b80dc04c8fd3dbb55..d661e8849e8ab47e9113f111c02caa4ce9ff6515 100644 (file)
--- 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)
index 2de3f446eb8b0d31f43081f8ed38ef6555c67724..bec24a5f491dc9d136023fcfb2fa4a547d519930 100644 (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
index 16151b4734a761d3e592c6a539013a3b398fd712..9383a63149e4205b3a4de7367fde72cac43df82a 100644 (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/
 
index d317e42a6e574d233b5709190e829bf6d24dca01..fe18354b581d0f1f83ed0fbba8a758492bab9ed7 100755 (executable)
--- 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...