summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarius Makovsky <traveltissues@protonmail.com>2019-10-23 13:32:03 +0100
committerDarius Makovsky <traveltissues@protonmail.com>2019-10-23 13:32:03 +0100
commit2affff8a7d6e2fbafc1fa628ec53b8db391623b6 (patch)
tree395f78830798e453b382e06d27b1125fb8765b3b
parent66840bf321f5f944ce7a34ab7d55ccb9d969ac31 (diff)
downloadbuildstream-traveltissues/1161-2.tar.gz
-rw-r--r--src/buildstream/plugins/sources/local.py29
1 files changed, 1 insertions, 28 deletions
diff --git a/src/buildstream/plugins/sources/local.py b/src/buildstream/plugins/sources/local.py
index e28098c38..98f74c16c 100644
--- a/src/buildstream/plugins/sources/local.py
+++ b/src/buildstream/plugins/sources/local.py
@@ -46,6 +46,7 @@ class LocalSource(Source):
# pylint: disable=attribute-defined-outside-init
BST_STAGE_VIRTUAL_DIRECTORY = True
+ BST_NO_PRESTAGE_KEY = True
def __init__(self, context, project, meta):
super().__init__(context, project, meta)
@@ -61,20 +62,6 @@ class LocalSource(Source):
def preflight(self):
pass
- def get_unique_key(self):
- if self.__unique_key is None:
- # Get a list of tuples of the the project relative paths and fullpaths
- if os.path.isdir(self.fullpath):
- filelist = utils.list_relative_paths(self.fullpath)
- filelist = [(relpath, os.path.join(self.fullpath, relpath)) for relpath in filelist]
- else:
- filelist = [(self.path, self.fullpath)]
-
- # Return a list of (relative filename, sha256 digest) tuples, a sorted list
- # has already been returned by list_relative_paths()
- self.__unique_key = [(relpath, unique_key(fullpath)) for relpath, fullpath in filelist]
- return self.__unique_key
-
def get_consistency(self):
return Consistency.CACHED
@@ -110,20 +97,6 @@ class LocalSource(Source):
return self.fullpath
-# Create a unique key for a file
-def unique_key(filename):
-
- # Return some hard coded things for files which
- # have no content to calculate a key for
- if os.path.islink(filename):
- # For a symbolic link, use the link target as its unique identifier
- return os.readlink(filename)
- elif os.path.isdir(filename):
- return "0"
-
- return utils.sha256sum(filename)
-
-
# Plugin entry point
def setup():
return LocalSource