mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-16 16:02:33 +03:00
Also glob the 'rm' field
This commit is contained in:
parent
d4f9f341ed
commit
559ad9ef5b
1 changed files with 3 additions and 3 deletions
|
@ -1094,7 +1094,7 @@ def prepare_source(vcs, app, build, build_dir, srclib_dir, extlib_dir, onserver=
|
||||||
|
|
||||||
# Delete unwanted files
|
# Delete unwanted files
|
||||||
if 'rm' in build:
|
if 'rm' in build:
|
||||||
for part in build['rm']:
|
for part in getpaths(build_dir, build, 'rm'):
|
||||||
dest = os.path.join(build_dir, part)
|
dest = os.path.join(build_dir, part)
|
||||||
logging.info("Removing {0}".format(part))
|
logging.info("Removing {0}".format(part))
|
||||||
if os.path.lexists(dest):
|
if os.path.lexists(dest):
|
||||||
|
@ -1183,7 +1183,7 @@ def getpaths(build_dir, build, field):
|
||||||
p = p.strip()
|
p = p.strip()
|
||||||
full_path = os.path.join(build_dir, p)
|
full_path = os.path.join(build_dir, p)
|
||||||
full_path = os.path.normpath(full_path)
|
full_path = os.path.normpath(full_path)
|
||||||
paths += [r[len(build_dir):] for r in glob.glob(full_path)]
|
paths += [r[len(build_dir)+1:] for r in glob.glob(full_path)]
|
||||||
return paths
|
return paths
|
||||||
|
|
||||||
# Scan the source code in the given directory (and all subdirectories)
|
# Scan the source code in the given directory (and all subdirectories)
|
||||||
|
@ -1259,7 +1259,7 @@ def scan_source(build_dir, root_dir, thisbuild):
|
||||||
|
|
||||||
# Path (relative) to the file
|
# Path (relative) to the file
|
||||||
fp = os.path.join(r, curfile)
|
fp = os.path.join(r, curfile)
|
||||||
fd = fp[len(build_dir):]
|
fd = fp[len(build_dir)+1:]
|
||||||
|
|
||||||
# Check if this file has been explicitly excluded from scanning
|
# Check if this file has been explicitly excluded from scanning
|
||||||
if toignore(fd):
|
if toignore(fd):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue