summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/package_deb.bbclass7
-rw-r--r--meta/classes/package_ipk.bbclass7
-rw-r--r--meta/classes/package_rpm.bbclass9
3 files changed, 19 insertions, 4 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"
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass
index e5e76ef278..526c3aecb1 100644
--- a/meta/classes/package_ipk.bbclass
+++ b/meta/classes/package_ipk.bbclass
@@ -216,12 +216,17 @@ package_update_index_ipk () {
216 packagedirs="$packagedirs ${DEPLOY_DIR_IPK}/$arch" 216 packagedirs="$packagedirs ${DEPLOY_DIR_IPK}/$arch"
217 done 217 done
218 218
219 found=0
219 for pkgdir in $packagedirs; do 220 for pkgdir in $packagedirs; do
220 if [ -e $pkgdir/ ]; then 221 if [ -e $pkgdir/ ]; then
222 found=1
221 touch $pkgdir/Packages 223 touch $pkgdir/Packages
222 flock $pkgdir/Packages.flock -c "opkg-make-index -r $pkgdir/Packages -p $pkgdir/Packages -m $pkgdir/" 224 flock $pkgdir/Packages.flock -c "opkg-make-index -r $pkgdir/Packages -p $pkgdir/Packages -m $pkgdir/"
223 fi 225 fi
224 done 226 done
227 if [ "$found" != "1" ]; then
228 bbfatal "There are no packages in ${DEPLOY_DIR_IPK}!"
229 fi
225} 230}
226 231
227# 232#
@@ -483,6 +488,6 @@ do_package_write_ipk[cleandirs] = "${PKGWRITEDIRIPK}"
483do_package_write_ipk[umask] = "022" 488do_package_write_ipk[umask] = "022"
484addtask package_write_ipk before do_package_write after do_packagedata do_package 489addtask package_write_ipk before do_package_write after do_packagedata do_package
485 490
486PACKAGEINDEXES += "package_update_index_ipk;" 491PACKAGEINDEXES += "[ ! -e ${DEPLOY_DIR_IPK} ] || package_update_index_ipk;"
487PACKAGEINDEXDEPS += "opkg-utils-native:do_populate_sysroot" 492PACKAGEINDEXDEPS += "opkg-utils-native:do_populate_sysroot"
488PACKAGEINDEXDEPS += "opkg-native:do_populate_sysroot" 493PACKAGEINDEXDEPS += "opkg-native:do_populate_sysroot"
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#
22package_update_index_rpm () { 22package_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
55rpm_log_check() { 60rpm_log_check() {
@@ -1129,6 +1134,6 @@ do_package_write_rpm[cleandirs] = "${PKGWRITEDIRRPM}"
1129do_package_write_rpm[umask] = "022" 1134do_package_write_rpm[umask] = "022"
1130addtask package_write_rpm before do_package_write after do_packagedata do_package 1135addtask package_write_rpm before do_package_write after do_packagedata do_package
1131 1136
1132PACKAGEINDEXES += "package_update_index_rpm; [ ! -e ${DEPLOY_DIR_RPM} ] || createrepo ${DEPLOY_DIR_RPM};" 1137PACKAGEINDEXES += "[ ! -e ${DEPLOY_DIR_RPM} ] || package_update_index_rpm;"
1133PACKAGEINDEXDEPS += "rpm-native:do_populate_sysroot" 1138PACKAGEINDEXDEPS += "rpm-native:do_populate_sysroot"
1134PACKAGEINDEXDEPS += "createrepo-native:do_populate_sysroot" 1139PACKAGEINDEXDEPS += "createrepo-native:do_populate_sysroot"