summaryrefslogtreecommitdiffstats
path: root/meta/classes/package_deb.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-02-17 08:57:17 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-02-17 22:32:03 +0000
commit74938e387c19c7b72e1553d4148a58a5a3d1ceff (patch)
treeaf1fb5120dfdcd554942fbc34b56297fd183b71f /meta/classes/package_deb.bbclass
parent069a332d1cf0778831673ed4ab5dfadbe2758783 (diff)
downloadpoky-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.bbclass7
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"
457addtask package_write_deb before do_package_write after do_packagedata do_package 462addtask package_write_deb before do_package_write after do_packagedata do_package
458 463
459 464
460PACKAGEINDEXES += "package_update_index_deb;" 465PACKAGEINDEXES += "[ ! -e ${DEPLOY_DIR_DEB} ] || package_update_index_deb;"
461PACKAGEINDEXDEPS += "dpkg-native:do_populate_sysroot" 466PACKAGEINDEXDEPS += "dpkg-native:do_populate_sysroot"
462PACKAGEINDEXDEPS += "apt-native:do_populate_sysroot" 467PACKAGEINDEXDEPS += "apt-native:do_populate_sysroot"