summaryrefslogtreecommitdiffstats
path: root/meta/classes/useradd-staticids.bbclass
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-03 16:00:28 +0100
commitb02da021b122d969c8b22a1181c7cc3fb8250379 (patch)
tree3cddccaeadee75e04e0e3fc793a2f8adec3478f3 /meta/classes/useradd-staticids.bbclass
parent2f42ef8d8fb1febf28252b98884cebabc931f720 (diff)
downloadast2050-yocto-poky-b02da021b122d969c8b22a1181c7cc3fb8250379.zip
ast2050-yocto-poky-b02da021b122d969c8b22a1181c7cc3fb8250379.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) Signed-off-by: Fabrice Coulon <fabrice@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/useradd-staticids.bbclass')
-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 a89cb10..421a70a 100644
--- a/meta/classes/useradd-staticids.bbclass
+++ b/meta/classes/useradd-staticids.bbclass
@@ -58,7 +58,9 @@ def update_useradd_static_config(d):
newparams = []
for param in re.split('''[ \t]*;[ \t]*(?=(?:[^'"]|'[^']*'|"[^"]*")*$)''', params):
- param=param.strip()
+ param = param.strip()
+ if not param:
+ continue
try:
uaargs = parser.parse_args(re.split('''[ \t]*(?=(?:[^'"]|'[^']*'|"[^"]*")*$)''', param))
except:
@@ -194,7 +196,9 @@ def update_useradd_static_config(d):
newparams = []
for param in re.split('''[ \t]*;[ \t]*(?=(?:[^'"]|'[^']*'|"[^"]*")*$)''', params):
- param=param.strip()
+ param = param.strip()
+ if not param:
+ continue
try:
# If we're processing multiple lines, we could have left over values here...
gaargs = parser.parse_args(re.split('''[ \t]*(?=(?:[^'"]|'[^']*'|"[^"]*")*$)''', param))
OpenPOWER on IntegriCloud