From 52de7a284a88cde41adf3bda1e4edd739ed225e9 Mon Sep 17 00:00:00 2001 From: Christopher Larson Date: Sat, 17 Mar 2018 07:22:39 +0500 Subject: [PATCH] oe.external: escape the pathname from FILES_MIRRORS Currently the substitutions fail to match if the path contains re special characters like '+', which is problematic. Signed-off-by: Christopher Larson --- lib/oe/external.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/oe/external.py b/lib/oe/external.py index 2754bad..e03666c 100644 --- a/lib/oe/external.py +++ b/lib/oe/external.py @@ -1,4 +1,5 @@ import os.path +import re import oe.path import bb @@ -29,8 +30,8 @@ def get_file_search_metadata(d): entry = entry.strip() if not entry: continue - pattern, subst = entry.strip().split('|', 1) - mirrors.append(('^' + pattern, subst)) + pathname, subst = entry.strip().split('|', 1) + mirrors.append(('^' + re.escape(pathname), subst)) source_paths = [os.path.realpath(p) for p in d.getVar('EXTERNAL_INSTALL_SOURCE_PATHS', True).split()]