summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabrice Coulon <fabrice@axis.com>2014-09-02 11:11:16 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-09-23 13:02:57 +0100
commita4d8015687cf9ddd6ef563e29cf840698f81c099 (patch)
treee2c7c164e2efbddafde3094e02ea5f3fb5c2a61b
parent7b57145498843a51d61b1ed81810023ba209a00b (diff)
downloadpoky-a4d8015687cf9ddd6ef563e29cf840698f81c099.tar.gz
useradd-staticids.bbclass: Fix for Bug 6633
When using the useradd-staticids.bbclass under meta/classes, this error occurs: "<username> - <username>: Username does not have a static uid defined." There was a problem with the regular expression for parsing parameters, it was sometimes returning an empty string. I have fixed this by skipping empty strings. (From OE-Core rev: f249ef32709069a2680b92dc5a5b4f6545d014b7) (From OE-Core rev: 592f0dccaf1985194f40fc019a9d33b9623df37f) Signed-off-by: Fabrice Coulon <fabrice@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/useradd-staticids.bbclass8
1 files changed, 6 insertions, 2 deletions
diff --git a/meta/classes/useradd-staticids.bbclass b/meta/classes/useradd-staticids.bbclass
index a89cb10a4a..421a70a6ab 100644
--- a/meta/classes/useradd-staticids.bbclass
+++ b/meta/classes/useradd-staticids.bbclass
@@ -58,7 +58,9 @@ def update_useradd_static_config(d):
58 58
59 newparams = [] 59 newparams = []
60 for param in re.split('''[ \t]*;[ \t]*(?=(?:[^'"]|'[^']*'|"[^"]*")*$)''', params): 60 for param in re.split('''[ \t]*;[ \t]*(?=(?:[^'"]|'[^']*'|"[^"]*")*$)''', params):
61 param=param.strip() 61 param = param.strip()
62 if not param:
63 continue
62 try: 64 try:
63 uaargs = parser.parse_args(re.split('''[ \t]*(?=(?:[^'"]|'[^']*'|"[^"]*")*$)''', param)) 65 uaargs = parser.parse_args(re.split('''[ \t]*(?=(?:[^'"]|'[^']*'|"[^"]*")*$)''', param))
64 except: 66 except:
@@ -194,7 +196,9 @@ def update_useradd_static_config(d):
194 196
195 newparams = [] 197 newparams = []
196 for param in re.split('''[ \t]*;[ \t]*(?=(?:[^'"]|'[^']*'|"[^"]*")*$)''', params): 198 for param in re.split('''[ \t]*;[ \t]*(?=(?:[^'"]|'[^']*'|"[^"]*")*$)''', params):
197 param=param.strip() 199 param = param.strip()
200 if not param:
201 continue
198 try: 202 try:
199 # If we're processing multiple lines, we could have left over values here... 203 # If we're processing multiple lines, we could have left over values here...
200 gaargs = parser.parse_args(re.split('''[ \t]*(?=(?:[^'"]|'[^']*'|"[^"]*")*$)''', param)) 204 gaargs = parser.parse_args(re.split('''[ \t]*(?=(?:[^'"]|'[^']*'|"[^"]*")*$)''', param))