mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-14 15:02:51 +03:00
Exclude .hg directory from scans, it can contain jars that were removed
This commit is contained in:
parent
2df8259408
commit
b4fc2f5c80
1 changed files with 16 additions and 14 deletions
30
common.py
30
common.py
|
@ -950,24 +950,26 @@ def scan_source(build_dir, root_dir, thisbuild):
|
|||
for r,d,f in os.walk(build_dir):
|
||||
for curfile in f:
|
||||
|
||||
# Path (relative) to the file...
|
||||
fp = os.path.join(r, curfile)
|
||||
if r.find('/.hg/') == -1:
|
||||
|
||||
for suspect in usual_suspects:
|
||||
if curfile.lower().find(suspect) != -1:
|
||||
msg = 'Found probable non-free blob ' + fp
|
||||
problems.append(msg)
|
||||
# Path (relative) to the file...
|
||||
fp = os.path.join(r, curfile)
|
||||
|
||||
if curfile.endswith('.java'):
|
||||
for line in file(fp):
|
||||
|
||||
if line.find('DexClassLoader') != -1:
|
||||
msg = 'Found DexClassLoader in ' + fp
|
||||
for suspect in usual_suspects:
|
||||
if curfile.lower().find(suspect) != -1:
|
||||
msg = 'Found probable non-free blob ' + fp
|
||||
problems.append(msg)
|
||||
|
||||
if line.lower().find('all rights reserved') != -1:
|
||||
msg = 'All rights reserved in ' + fp
|
||||
problems.append(msg)
|
||||
if curfile.endswith('.java'):
|
||||
for line in file(fp):
|
||||
|
||||
if line.find('DexClassLoader') != -1:
|
||||
msg = 'Found DexClassLoader in ' + fp
|
||||
problems.append(msg)
|
||||
|
||||
if line.lower().find('all rights reserved') != -1:
|
||||
msg = 'All rights reserved in ' + fp
|
||||
problems.append(msg)
|
||||
|
||||
# Presence of a jni directory without buildjni=yes might
|
||||
# indicate a problem...
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue