* [PATCH] data_smart: Fix unanchored regexp causing strange parsing issue
@ 2012-08-03 9:24 Richard Purdie
0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2012-08-03 9:24 UTC (permalink / raw)
To: bitbake-devel
If this regular expression is unanchored, it would accept strings like:
do_install_append1
do_install_appendsomelongstring
and treat them like they were do_install_append. Clearly this isn't desirable.
Only one instance of this type of issue was found in OE-Core and has been fixed
so correcting the regexp should be safe to do.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py
index 730deaa..31216e0 100644
--- a/bitbake/lib/bb/data_smart.py
+++ b/bitbake/lib/bb/data_smart.py
@@ -39,7 +39,7 @@ from bb.COW import COWDictBase
logger = logging.getLogger("BitBake.Data")
__setvar_keyword__ = ["_append", "_prepend"]
-__setvar_regexp__ = re.compile('(?P<base>.*?)(?P<keyword>_append|_prepend)(_(?P<add>.*))?')
+__setvar_regexp__ = re.compile('(?P<base>.*?)(?P<keyword>_append|_prepend)(_(?P<add>.*))?$')
__expand_var_regexp__ = re.compile(r"\${[^{}]+}")
__expand_python_regexp__ = re.compile(r"\${@.+?}")
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-08-03 9:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-03 9:24 [PATCH] data_smart: Fix unanchored regexp causing strange parsing issue Richard Purdie
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.