package_rpm: DEPLOY_DIR_RPM must exist before make index

There is a package-index.bb which will update the index, but the
DEPLOY_DIR_RPM may not exist, for example, when "bitbake package-index"
in a fresh build.

Only the package_rpm.bbclass needs this, the package_ipk.bbclass and
package_deb.bbclass doesn't need.

[YOCTO #2753]

(From OE-Core rev: 72e18bb4171698a386b277b12d973e3d0fd7c4cc)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Robert Yang 2012-07-20 17:49:16 +08:00 committed by Richard Purdie
parent a6898ff7a5
commit eb5522e9b0
1 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ RPMCONF_HOST_BASE = "${DEPLOY_DIR_RPM}/solvedb-sdk"
# Update the Packages depsolver db in ${DEPLOY_DIR_RPM}
#
package_update_index_rpm () {
if [ ! -z "${DEPLOY_KEEP_PACKAGES}" ]; then
if [ ! -z "${DEPLOY_KEEP_PACKAGES}" -o ! -e "${DEPLOY_DIR_RPM}" ]; then
return
fi
@ -1171,6 +1171,6 @@ do_package_write_rpm[dirs] = "${PKGWRITEDIRRPM}"
do_package_write_rpm[umask] = "022"
addtask package_write_rpm before do_package_write after do_package
PACKAGEINDEXES += "package_update_index_rpm; createrepo ${DEPLOY_DIR_RPM};"
PACKAGEINDEXES += "package_update_index_rpm; [ ! -e ${DEPLOY_DIR_RPM} ] || createrepo ${DEPLOY_DIR_RPM};"
PACKAGEINDEXDEPS += "rpm-native:do_populate_sysroot"
PACKAGEINDEXDEPS += "createrepo-native:do_populate_sysroot"