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:32:03 +0000 |
commit | 74938e387c19c7b72e1553d4148a58a5a3d1ceff (patch) | |
tree | af1fb5120dfdcd554942fbc34b56297fd183b71f /meta/classes/package_deb.bbclass | |
parent | 069a332d1cf0778831673ed4ab5dfadbe2758783 (diff) | |
download | poky-74938e387c19c7b72e1553d4148a58a5a3d1ceff.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.
(From OE-Core rev: 721ef058b37604e100021ec7a90ad2f745d83916)
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 5740948c1a..f4b18c36d0 100644 --- a/meta/classes/package_deb.bbclass +++ b/meta/classes/package_deb.bbclass | |||
@@ -78,6 +78,7 @@ package_update_index_deb () { | |||
78 | fi | 78 | fi |
79 | done | 79 | done |
80 | 80 | ||
81 | found=0 | ||
81 | for arch in $debarchs; do | 82 | for arch in $debarchs; do |
82 | if [ ! -d ${DEPLOY_DIR_DEB}/$arch ]; then | 83 | if [ ! -d ${DEPLOY_DIR_DEB}/$arch ]; then |
83 | continue; | 84 | continue; |
@@ -85,7 +86,11 @@ package_update_index_deb () { | |||
85 | cd ${DEPLOY_DIR_DEB}/$arch | 86 | cd ${DEPLOY_DIR_DEB}/$arch |
86 | dpkg-scanpackages . | gzip > Packages.gz | 87 | dpkg-scanpackages . | gzip > Packages.gz |
87 | echo "Label: $arch" > Release | 88 | echo "Label: $arch" > Release |
89 | found=1 | ||
88 | done | 90 | done |
91 | if [ "$found" != "1" ]; then | ||
92 | bbfatal "There are no packages in ${DEPLOY_DIR_DEB}!" | ||
93 | fi | ||
89 | } | 94 | } |
90 | 95 | ||
91 | # | 96 | # |
@@ -457,6 +462,6 @@ do_package_write_deb[umask] = "022" | |||
457 | addtask package_write_deb before do_package_write after do_packagedata do_package | 462 | addtask package_write_deb before do_package_write after do_packagedata do_package |
458 | 463 | ||
459 | 464 | ||
460 | PACKAGEINDEXES += "package_update_index_deb;" | 465 | PACKAGEINDEXES += "[ ! -e ${DEPLOY_DIR_DEB} ] || package_update_index_deb;" |
461 | PACKAGEINDEXDEPS += "dpkg-native:do_populate_sysroot" | 466 | PACKAGEINDEXDEPS += "dpkg-native:do_populate_sysroot" |
462 | PACKAGEINDEXDEPS += "apt-native:do_populate_sysroot" | 467 | PACKAGEINDEXDEPS += "apt-native:do_populate_sysroot" |