aboutsummaryrefslogtreecommitdiff
path: root/linaro_image_tools/media_create
diff options
context:
space:
mode:
authorFathi Boudra <fathi.boudra@linaro.org>2016-05-11 00:15:25 +0300
committerFathi Boudra <fathi.boudra@linaro.org>2016-05-11 00:15:25 +0300
commit3bbce609714a3ddcb692daaa27f440cee9d68ce7 (patch)
treecd4ef93a094bf315242b76f5082ccb34c2145f38 /linaro_image_tools/media_create
parent4af65698c1028a9e5b64963b073b15c93d18d96f (diff)
downloadlinaro-image-tools-3bbce609714a3ddcb692daaa27f440cee9d68ce7.tar.gz
Filter out symlinks in _get_file_matching()
Due to the rootfs changes, kernel/initrd are shipped with unversioned symlinks now. The number of files is now 2 at minimum (symlink and real file). Fix the following error: ValueError: Too many files matching '/tmp/tmpq2xWZQ/rootfs/binary/boot/Image*' found. Regression introduced in: https://git.linaro.org/ci/ubuntu-build-service.git/commitdiff/9d07c7b60f18c207b9b446e1f3bb2eedf8ad4876 Change-Id: I0235dcd1e0faa9c6159345b1f35987f7fa8fe4fb Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org> Reported-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Diffstat (limited to 'linaro_image_tools/media_create')
-rw-r--r--linaro_image_tools/media_create/boards.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/linaro_image_tools/media_create/boards.py b/linaro_image_tools/media_create/boards.py
index f6f03f8..f00e740 100644
--- a/linaro_image_tools/media_create/boards.py
+++ b/linaro_image_tools/media_create/boards.py
@@ -2083,7 +2083,8 @@ def _get_file_matching(regex):
If zero or more than one files match, raise a ValueError.
"""
- files = glob.glob(regex)
+ files = [fn for fn in glob.glob(regex)
+ if not os.path.islink(fn)]
if len(files) == 1:
return files[0]
elif len(files) == 0: