mirror of
https://github.com/f-droid/fdroidserver.git
synced 2026-03-27 03:12:02 -04:00
Merge branch 'purge-remove_debuggable_flags' into 'master'
purge remove_debuggable_flags(), upstreams should handle this See merge request fdroid/fdroidserver!1734
This commit is contained in:
@@ -2175,16 +2175,6 @@ def ant_subprojects(root_dir):
|
||||
return subprojects
|
||||
|
||||
|
||||
def remove_debuggable_flags(root_dir):
|
||||
# Remove forced debuggable flags
|
||||
logging.debug("Removing debuggable flags from %s" % root_dir)
|
||||
for root, dirs, files in os.walk(root_dir):
|
||||
if 'AndroidManifest.xml' in files and os.path.isfile(os.path.join(root, 'AndroidManifest.xml')):
|
||||
regsub_file(r'android:debuggable="[^"]*"',
|
||||
'',
|
||||
os.path.join(root, 'AndroidManifest.xml'))
|
||||
|
||||
|
||||
vcsearch_g = re.compile(r'''\b[Vv]ersionCode\s*=?\s*["'(]*([0-9][0-9_]*)["')]*''').search
|
||||
vnsearch_g = re.compile(r'''\b[Vv]ersionName\s*=?\s*\(?(["'])((?:(?=(\\?))\3.)*?)\1''').search
|
||||
vnssearch_g = re.compile(r'''\b[Vv]ersionNameSuffix\s*=?\s*(["'])((?:(?=(\\?))\3.)*?)\1''').search
|
||||
@@ -2551,7 +2541,6 @@ def getsrclib(spec, srclib_dir, basepath=False,
|
||||
libdir = sdir
|
||||
|
||||
remove_signing_keys(sdir)
|
||||
remove_debuggable_flags(sdir)
|
||||
|
||||
if prepare:
|
||||
|
||||
@@ -2716,9 +2705,6 @@ def prepare_source(vcs, app, build, build_dir, srclib_dir, extlib_dir, onserver=
|
||||
r'compileSdkVersion %s' % n,
|
||||
gradlefile)
|
||||
|
||||
# Remove forced debuggable flags
|
||||
remove_debuggable_flags(root_dir)
|
||||
|
||||
# Insert versionCode and number into the manifest if necessary
|
||||
if build.forceversion:
|
||||
logging.info("Changing the versionName")
|
||||
|
||||
@@ -56,7 +56,6 @@
|
||||
tools:ignore="ProtectedPermissions"/>
|
||||
|
||||
<application
|
||||
android:debuggable="true"
|
||||
android:name="FDroidApp"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
|
||||
@@ -1835,19 +1835,16 @@ class CommonTest(SetUpTearDownMixin, unittest.TestCase):
|
||||
|
||||
vcs = mock.Mock()
|
||||
skm = mock.Mock()
|
||||
dfm = mock.Mock()
|
||||
|
||||
with tempfile.TemporaryDirectory() as tmpdir, TmpCwd(tmpdir):
|
||||
os.makedirs(os.path.join('srclib', 'ACRA'))
|
||||
with mock.patch('fdroidserver.common.getvcs', return_value=vcs):
|
||||
with mock.patch('fdroidserver.common.remove_signing_keys', skm):
|
||||
with mock.patch('fdroidserver.common.remove_debuggable_flags', dfm):
|
||||
ret = fdroidserver.common.getsrclib('ACRA@acra-4.6.2', 'srclib')
|
||||
self.assertEqual(vcs.srclib, ('ACRA', None, 'srclib/ACRA'))
|
||||
vcs.gotorevision.assert_called_once_with('acra-4.6.2', True)
|
||||
skm.assert_called_once_with('srclib/ACRA')
|
||||
dfm.assert_called_once_with('srclib/ACRA')
|
||||
self.assertEqual(ret, ('ACRA', None, 'srclib/ACRA'))
|
||||
ret = fdroidserver.common.getsrclib('ACRA@acra-4.6.2', 'srclib')
|
||||
self.assertEqual(vcs.srclib, ('ACRA', None, 'srclib/ACRA'))
|
||||
vcs.gotorevision.assert_called_once_with('acra-4.6.2', True)
|
||||
skm.assert_called_once_with('srclib/ACRA')
|
||||
self.assertEqual(ret, ('ACRA', None, 'srclib/ACRA'))
|
||||
|
||||
def test_run_yamllint_wellformed(self):
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user