diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-02-17 08:57:17 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-02-17 22:31:29 +0000 |
commit | 721ef058b37604e100021ec7a90ad2f745d83916 (patch) | |
tree | fa45976e7c3653df338a701661cdeb1502bcc230 /meta/classes/package_deb.bbclass | |
parent | 24cbe88429ba021d7c461e0271b67106d11d5eb2 (diff) | |
download | openembedded-core-contrib-721ef058b37604e100021ec7a90ad2f745d83916.tar.gz |
package_rpm/deb/ipk: Error if we don't find packages when creating the package index
If for whatever reason the package directory is empty of packages, it
makes sense to error early rather than later in what become much
more obtuse errors. This adds in a sanity check to each of the packaging
backends. It also removes the duplicate createrepo call since the
core index creation function now uses this directly after the switch
to smart.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package_deb.bbclass')
-rw-r--r-- | meta/classes/package_deb.bbclass | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass index 5740948c1a8..f4b18c36d03 100644 --- a/meta/classes/package_deb.bbclass +++ b/meta/classes/package_deb.bbclass @@ -78,6 +78,7 @@ package_update_index_deb () { fi done + found=0 for arch in $debarchs; do if [ ! -d ${DEPLOY_DIR_DEB}/$arch ]; then continue; @@ -85,7 +86,11 @@ package_update_index_deb () { cd ${DEPLOY_DIR_DEB}/$arch dpkg-scanpackages . | gzip > Packages.gz echo "Label: $arch" > Release + found=1 done + if [ "$found" != "1" ]; then + bbfatal "There are no packages in ${DEPLOY_DIR_DEB}!" + fi } # @@ -457,6 +462,6 @@ do_package_write_deb[umask] = "022" addtask package_write_deb before do_package_write after do_packagedata do_package -PACKAGEINDEXES += "package_update_index_deb;" +PACKAGEINDEXES += "[ ! -e ${DEPLOY_DIR_DEB} ] || package_update_index_deb;" PACKAGEINDEXDEPS += "dpkg-native:do_populate_sysroot" PACKAGEINDEXDEPS += "apt-native:do_populate_sysroot" |