]> code.ossystems Code Review - openembedded-core.git/commitdiff
package_rpm: DEPLOY_DIR_RPM must exist before make index
authorRobert Yang <liezhi.yang@windriver.com>
Fri, 20 Jul 2012 09:49:16 +0000 (17:49 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 20 Jul 2012 11:29:35 +0000 (12:29 +0100)
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]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/package_rpm.bbclass

index d213e40dee9903f616428c5393e223eebccb261f..983be4cfd0e0205f93836265050750b2b025f38e 100644 (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"