Bug 6633

Summary: Problem in useradd-staticids.bbclass
Product: [Build System, Metadata & Runtime] Meta-yocto Reporter: fabrice.coulon
Component: meta-yoctoAssignee: Richard Purdie <richard.purdie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: poky.bs.watcher, poky.watcher
Version: 1.6.1   
Target Milestone: 1.6.2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know
Attachments:
Description Flags
patch file produced with diff -u none

Description fabrice.coulon 2014-08-18 08:48:10 UTC
Created attachment 2089 [details]
patch file produced with diff -u

When using the useradd-staticids.bbclass under poky-daisy-11.0.1/meta/classes, I get an error "<username> - <username>: Username  does not have a static uid defined."

But <usersname> was correctly defined in my UID table. 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 in the attached patch.
Comment 1 fabrice.coulon 2014-08-29 08:44:56 UTC
The bug was found in poky-daisy-11.0.1/meta/classes/useradd-staticids.bbclass

I don't really get where the version 1.6.1 or milestone 1.6.2 is coming from but we would really appreciate if somebody could make this fix available on master and not just in an old maintenance release of poky.

I will send a patch from master in a separate email to the Yocto mailing list asap.

Thanks!
Comment 2 Richard Purdie 2014-09-23 12:10:12 UTC
Fix merged into master and daisy, thanks! To make it into an older release, the fix needs to be applied to master first btw.

http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=b02da021b122d969c8b22a1181c7cc3fb8250379
http://git.yoctoproject.org/cgit.cgi/poky/commit/?h=daisy&id=a4d8015687cf9ddd6ef563e29cf840698f81c099