Bug 3917 - base-passwd.preinst:bitbake core-image-minimal failed
Summary: base-passwd.preinst:bitbake core-image-minimal failed
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 1.4
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.4 M5
Assignee: Hongxu Jia
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2013-02-20 10:45 UTC by Hongxu Jia
Modified: 2013-03-01 05:47 UTC (History)
10 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 Hongxu Jia 2013-02-20 10:45:05 UTC
*env
Settings from local.conf:
PACKAGE_CLASSES ?= "package_deb"
IMAGE_FEATURES += "package-management ssh-server-openssh"

*problem
Run `bitbake core-image-minimal' failed
>>log<<
cannot create $D${sysconfdir}/passwd: Directory nonexistent
cannot create $D${sysconfdir}/group: Directory nonexistent

*analysis
In meta/recipes-core/base-passwd/base-passwd_3.5.26.bb, 
.................
 if [ ! -e $D${sysconfdir}/passwd ]; then
 \tcat << EOF > $D${sysconfdir}/passwd
 """ + passwd + """EOF
 fi
 if [ ! -e $D${sysconfdir}/group ]; then
 \tcat << EOF > $D${sysconfdir}/group
 """ + group + """EOF
 fi
.................
It creates files `passwd' and `group' in `$D${sysconfdir}',
if `$D${sysconfdir}' does not exist, run base-passwd.preinst
to install base-passwd at image ceation time failed.

*resolution
Check the existance of dir before file creation.
Comment 2 Yi Zhao 2013-03-01 05:47:51 UTC
Verified with master branch: 0bedc0b80d9b46cbbf4a2c5e120a6aa52cbc7c2e

Steps:
1. In conf/local.conf:
    PACKAGE_CLASSES ?= "package_deb"
    IMAGE_FEATURES += "package-management ssh-server-openssh"
2. Run `bitbake core-image-minimal