Bug 4558 - script "yocto-kernel config add" could add one component more than one times
Summary: script "yocto-kernel config add" could add one component more than one times
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: kernel (show other bugs)
Version: 1.5
Hardware: x86 Multiple
: Low normal
Target Milestone: 1.5 M2
Assignee: Ning Zhang
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2013-05-27 07:21 UTC by Ning Zhang
Modified: 2013-06-06 02:11 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ning Zhang 2013-05-27 07:21:31 UTC
Branch: poky/master
Git rev: 176a46b088135f2891983bb8540bc45389341d90

Steps:
1. create a new bsp with all the default options:  
    yocto-bsp create myqemux86 qemu
2. modify conf/bblayers.conf, BBLAYERS field, added "meta-myqemux86" directory
3. input "yocto-kernel config add myqemux86 CONFIG_MISC_DEVICES=y" 3 times
4. input "yocto-kernel config list myqemux86" to check, you will get below list:

The current set of machine-specific kernel config items for myqemux86 is:
	1) CONFIG_MISC_DEVICES=y
	2) CONFIG_MISC_DEVICES=y
	3) CONFIG_MISC_DEVICES=y

The same component "CONFIG_MISC_DEVICES" lists 3 times.

I think when add the configration, the script should first check, if this option already exists: 
If yes, only tell the customer the configration is duplicate, but not truely add it.
If no, then add it.
Comment 1 Darren Hart 2013-05-28 20:42:36 UTC
Ning, are you planning on working this bug? If so, please move Status to Accepted and the Target Milestone to something appropriate, perhaps 1.5 M2. As the bug is not a functional failure, I've marked it as "Low" priority.
Comment 2 Ning Zhang 2013-05-29 08:05:20 UTC
I will fix this bug soon.
Add the current items check before add a new one.
Comment 3 Ning Zhang 2013-06-06 02:11:39 UTC
fixed this bug with commit 0ef93c5ee9a0e35d993ec8c6b9d7e8ffcf767b4b

http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/?h=ning/znbug4558&id=607ff646bb9a3c780299eccbd6bdef7724658708