Bug 3677

Summary: apt-native: apt.conf.sample cannot be created correctly
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Hongxu Jia <hongxu.jia>
Component: devtools / tool chainAssignee: Hongxu Jia <hongxu.jia>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: bogdan.a.marinescu, hongxu.jia, kai.kang, liang.li2, liezhi.yang, meta.mr.watcher, meta.watcher, Qi.Chen, sgw, yi.zhao, zhenfeng.zhao
Version: 1.4   
Target Milestone: 1.4 M4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Hongxu Jia 2013-01-05 11:26:44 UTC
*problem
1. Firt time to execute "bitbake apt-native", apt.conf.sample is created.
2. Execute "bitbake apt-native -ccleansstate", apt.conf.sample is not removed.
3. Remove apt.conf.sample by hand and then execute "bitbake apt-native",
   apt.conf.sample is not created any more.

*analysis
1.The task of "do_install_config" incorrectly use "os.path.join" to create
  dir of "outdir" which is used to keep "apt.conf.sample". 

2.The rule to create "apt.conf.sample" is by the existance of "outdir", 
  not the file itself.

*solution
1. Remove "/" of sysconfdir.
2. To create "apt.conf.sample" if it doesn't exist.
Comment 1 Hongxu Jia 2013-01-08 10:01:25 UTC
Patch sent on the mailing list.
Comment 2 Hongxu Jia 2013-01-10 06:43:14 UTC
As Richard suggestion:

Use oe.path.join() instead which doesn't have this problem.
Comment 4 liang li 2013-01-11 10:24:44 UTC
no such error with git master branch commit 66f4c8a674d9f8db958b13866af4d63ab8cbcd44