summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2020-06-22 21:02:52 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2020-06-22 21:05:26 +0530
commitdd4a2d08485abbaad05a3e64a9a6034f9f788d04 (patch)
treea6661342c23b40aabd6c3e023fc70ed1f75536db
parent586abb8abbe5cb5de2b36f8a547f038667413104 (diff)
cerbero: Fix bundle-source and recipe missing files1.17.1
They were using shell.check_call which was removed a few months ago. Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/523>
-rw-r--r--cerbero/utils/shell.py10
-rw-r--r--setup.py4
2 files changed, 6 insertions, 8 deletions
diff --git a/cerbero/utils/shell.py b/cerbero/utils/shell.py
index 2dbb83db..0cc6e898 100644
--- a/cerbero/utils/shell.py
+++ b/cerbero/utils/shell.py
@@ -497,12 +497,10 @@ def ls_dir(dirpath, prefix):
return files
-def find_newer_files(prefix, compfile, include_link=False):
- include_links = include_link and '-L' or ''
- cmd = 'find %s * -type f -cnewer %s' % (include_links, compfile)
- sfiles = check_call(cmd, prefix, True, False, False).split('\n')
- sfiles.remove('')
- return sfiles
+def find_newer_files(prefix, compfile):
+ cmd = ['find', '.', '-type', 'f', '-cnewer', compfile]
+ out = check_call(cmd, cmd_dir=prefix, fail=False)
+ return out.strip().split('\n')
def replace(filepath, replacements):
diff --git a/setup.py b/setup.py
index b8d47b22..4efe5ec5 100644
--- a/setup.py
+++ b/setup.py
@@ -18,10 +18,10 @@ def read(fname):
# Utility function to parse directories
def parse_dir(dirpath, extension=None):
if os.path.exists('.git'):
- files = shell.check_call('git ls-files %s' % dirpath).split('\n')
+ files = shell.check_output(['git', 'ls-files', dirpath]).split('\n')
files.remove('')
else:
- files = shell.check_call('find %s -type f' % dirpath).split('\n')
+ files = shell.check_output(['find', dirpath, '-type', 'f']).split('\n')
files.remove('')
if extension is None:
return files