diff options
Diffstat (limited to 'meta/classes/package_rpm.bbclass')
-rw-r--r-- | meta/classes/package_rpm.bbclass | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass index 8ea2bbedb2..8eb93ce15d 100644 --- a/meta/classes/package_rpm.bbclass +++ b/meta/classes/package_rpm.bbclass | |||
@@ -20,7 +20,7 @@ python package_rpm_install () { | |||
20 | # Update the packages indexes ${DEPLOY_DIR_RPM} | 20 | # Update the packages indexes ${DEPLOY_DIR_RPM} |
21 | # | 21 | # |
22 | package_update_index_rpm () { | 22 | package_update_index_rpm () { |
23 | if [ ! -z "${DEPLOY_KEEP_PACKAGES}" -o ! -e "${DEPLOY_DIR_RPM}" ]; then | 23 | if [ ! -z "${DEPLOY_KEEP_PACKAGES}" ]; then |
24 | return | 24 | return |
25 | fi | 25 | fi |
26 | 26 | ||
@@ -45,11 +45,16 @@ package_update_index_rpm () { | |||
45 | echo $arch | 45 | echo $arch |
46 | done | sort | uniq` | 46 | done | sort | uniq` |
47 | 47 | ||
48 | found=0 | ||
48 | for arch in $archs; do | 49 | for arch in $archs; do |
49 | if [ -d ${DEPLOY_DIR_RPM}/$arch ] ; then | 50 | if [ -d ${DEPLOY_DIR_RPM}/$arch ] ; then |
50 | createrepo --update -q ${DEPLOY_DIR_RPM}/$arch | 51 | createrepo --update -q ${DEPLOY_DIR_RPM}/$arch |
52 | found=1 | ||
51 | fi | 53 | fi |
52 | done | 54 | done |
55 | if [ "$found" != "1" ]; then | ||
56 | bbfatal "There are no packages in ${DEPLOY_DIR_RPM}!" | ||
57 | fi | ||
53 | } | 58 | } |
54 | 59 | ||
55 | rpm_log_check() { | 60 | rpm_log_check() { |
@@ -1129,6 +1134,6 @@ do_package_write_rpm[cleandirs] = "${PKGWRITEDIRRPM}" | |||
1129 | do_package_write_rpm[umask] = "022" | 1134 | do_package_write_rpm[umask] = "022" |
1130 | addtask package_write_rpm before do_package_write after do_packagedata do_package | 1135 | addtask package_write_rpm before do_package_write after do_packagedata do_package |
1131 | 1136 | ||
1132 | PACKAGEINDEXES += "package_update_index_rpm; [ ! -e ${DEPLOY_DIR_RPM} ] || createrepo ${DEPLOY_DIR_RPM};" | 1137 | PACKAGEINDEXES += "[ ! -e ${DEPLOY_DIR_RPM} ] || package_update_index_rpm;" |
1133 | PACKAGEINDEXDEPS += "rpm-native:do_populate_sysroot" | 1138 | PACKAGEINDEXDEPS += "rpm-native:do_populate_sysroot" |
1134 | PACKAGEINDEXDEPS += "createrepo-native:do_populate_sysroot" | 1139 | PACKAGEINDEXDEPS += "createrepo-native:do_populate_sysroot" |