diff options
author | Jürg Billeter <j@bitron.ch> | 2020-01-22 13:15:34 +0100 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2020-02-11 21:08:59 +0100 |
commit | c45ea0d36a3f7fea67f5b98f2757672c174619aa (patch) | |
tree | 447d4dd1ce4ab0cc53f9338d1bbfd3d31d15178a /src/buildstream | |
parent | 1ee61a88bf0e3cbb0395153c681124990004e4ca (diff) | |
download | buildstream-c45ea0d36a3f7fea67f5b98f2757672c174619aa.tar.gz |
element.py: stage_artifact(): Drop unused update_mtimes parameter
Diffstat (limited to 'src/buildstream')
-rw-r--r-- | src/buildstream/element.py | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/src/buildstream/element.py b/src/buildstream/element.py index 4d91976f9..6a3717635 100644 --- a/src/buildstream/element.py +++ b/src/buildstream/element.py @@ -75,7 +75,6 @@ Class Reference import os import re import stat -import time import copy from collections import OrderedDict import contextlib @@ -626,8 +625,7 @@ class Element(Plugin): path: str = None, include: Optional[List[str]] = None, exclude: Optional[List[str]] = None, - orphans: bool = True, - update_mtimes: Optional[List[str]] = None + orphans: bool = True ) -> FileListResult: """Stage this element's output artifact in the sandbox @@ -642,7 +640,6 @@ class Element(Plugin): include: An optional list of domains to include files from exclude: An optional list of domains to exclude files from orphans: Whether to include files not spoken for by split domains - update_mtimes: An optional list of files whose mtimes to set to the current time. Raises: (:class:`.ElementError`): If the element has not yet produced an artifact. @@ -672,9 +669,6 @@ class Element(Plugin): ) raise ElementError("No artifacts to stage", detail=detail, reason="uncached-checkout-attempt") - if update_mtimes is None: - update_mtimes = [] - # Time to use the artifact, check once more that it's there self.__assert_cached() @@ -690,28 +684,10 @@ class Element(Plugin): split_filter = self.__split_filter_func(include, exclude, orphans) - # We must not hardlink files whose mtimes we want to update - if update_mtimes: - - def link_filter(path): - return (split_filter is None or split_filter(path)) and path not in update_mtimes - - def copy_filter(path): - return (split_filter is None or split_filter(path)) and path in update_mtimes - - else: - link_filter = split_filter - result = vstagedir.import_files( - files_vdir, filter_callback=link_filter, report_written=True, can_link=True + files_vdir, filter_callback=split_filter, report_written=True, can_link=True ) - if update_mtimes: - copy_result = vstagedir.import_files( - files_vdir, filter_callback=copy_filter, report_written=True, update_mtime=time.time() - ) - result = result.combine(copy_result) - return result def stage_dependency_artifacts( |