summaryrefslogtreecommitdiff
path: root/buildstream/_frontend
diff options
context:
space:
mode:
authorJames Ennis <james.ennis@codethink.com>2019-01-23 12:26:00 +0000
committerJames Ennis <james.ennis@codethink.com>2019-02-13 09:35:45 +0000
commitf95d6ee8970e64487cdfece39e00ad402774617a (patch)
treedc9345d2814349685c130ff229998894fa6f88c1 /buildstream/_frontend
parent775ac472a3bb86fe048924d843fbfde69ff2b911 (diff)
downloadbuildstream-f95d6ee8970e64487cdfece39e00ad402774617a.tar.gz
cli.py: Remove _classify_artifacts() method
This method has been moved to Stream, where is it used there exclusively.
Diffstat (limited to 'buildstream/_frontend')
-rw-r--r--buildstream/_frontend/cli.py33
1 files changed, 0 insertions, 33 deletions
diff --git a/buildstream/_frontend/cli.py b/buildstream/_frontend/cli.py
index 43c5269cd..e3c5059b9 100644
--- a/buildstream/_frontend/cli.py
+++ b/buildstream/_frontend/cli.py
@@ -1,7 +1,6 @@
import os
import sys
from contextlib import ExitStack
-from fnmatch import fnmatch
from functools import partial
from tempfile import TemporaryDirectory
@@ -901,38 +900,6 @@ def workspace_list(app):
#############################################################
# Artifact Commands #
#############################################################
-def _classify_artifacts(names, cas, project_directory):
- element_targets = []
- artifact_refs = []
- element_globs = []
- artifact_globs = []
-
- for name in names:
- if name.endswith('.bst'):
- if any(c in "*?[" for c in name):
- element_globs.append(name)
- else:
- element_targets.append(name)
- else:
- if any(c in "*?[" for c in name):
- artifact_globs.append(name)
- else:
- artifact_refs.append(name)
-
- if element_globs:
- for dirpath, _, filenames in os.walk(project_directory):
- for filename in filenames:
- element_path = os.path.join(dirpath, filename).lstrip(project_directory).lstrip('/')
- if any(fnmatch(element_path, glob) for glob in element_globs):
- element_targets.append(element_path)
-
- if artifact_globs:
- artifact_refs.extend(ref for ref in cas.list_refs()
- if any(fnmatch(ref, glob) for glob in artifact_globs))
-
- return element_targets, artifact_refs
-
-
@cli.group(short_help="Manipulate cached artifacts")
def artifact():
"""Manipulate cached artifacts"""