summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2019-02-25 13:18:00 +0100
committerJürg Billeter <j@bitron.ch>2019-02-26 13:06:53 +0100
commit74678718fbcb9bca0ec4e3502b1b5969a3de805a (patch)
tree2df38b3e7dce35ccc3f9645d2e7c9c703b0e8310
parentfeeaadf02fcc43fd9d86e59c5c558ee7c78b1a63 (diff)
downloadbuildstream-74678718fbcb9bca0ec4e3502b1b5969a3de805a.tar.gz
utils.py: Remove unused presorted parameter from _process_list()
-rw-r--r--buildstream/utils.py16
1 files changed, 3 insertions, 13 deletions
diff --git a/buildstream/utils.py b/buildstream/utils.py
index dce9a71dc..a5c6010bc 100644
--- a/buildstream/utils.py
+++ b/buildstream/utils.py
@@ -380,14 +380,13 @@ def copy_files(src, dest, *, filter_callback=None, ignore_missing=False, report_
UNIX domain socket files from `src` are ignored.
"""
files = list_relative_paths(src)
- presorted = True
result = FileListResult()
try:
_process_list(src, dest, files, safe_copy, result,
filter_callback=filter_callback,
ignore_missing=ignore_missing,
- report_written=report_written, presorted=presorted)
+ report_written=report_written)
except OSError as e:
raise UtilError("Failed to copy '{} -> {}': {}"
.format(src, dest, e))
@@ -427,14 +426,13 @@ def link_files(src, dest, *, filter_callback=None, ignore_missing=False, report_
UNIX domain socket files from `src` are ignored.
"""
files = list_relative_paths(src)
- presorted = True
result = FileListResult()
try:
_process_list(src, dest, files, safe_link, result,
filter_callback=filter_callback,
ignore_missing=ignore_missing,
- report_written=report_written, presorted=presorted)
+ report_written=report_written)
except OSError as e:
raise UtilError("Failed to link '{} -> {}': {}"
.format(src, dest, e))
@@ -818,13 +816,11 @@ def _ensure_real_directory(root, path):
# result: The FileListResult
# filter_callback: Optional callback to invoke for every directory entry
# ignore_missing: Dont raise any error if a source file is missing
-# presorted: Whether the passed list is known to be presorted
#
#
def _process_list(srcdir, destdir, filelist, actionfunc, result,
filter_callback=None,
- ignore_missing=False, report_written=False,
- presorted=False):
+ ignore_missing=False, report_written=False):
# Keep track of directory permissions, since these need to be set
# *after* files have been written.
@@ -833,12 +829,6 @@ def _process_list(srcdir, destdir, filelist, actionfunc, result,
if filter_callback:
filelist = [path for path in filelist if filter_callback(path)]
- # Sorting the list of files is necessary to ensure that we processes
- # symbolic links which lead to directories before processing files inside
- # those directories.
- if not presorted:
- filelist = sorted(filelist)
-
# Now walk the list
for path in filelist:
srcpath = os.path.join(srcdir, path)