[oe] [PATCH] package_deb.bbclass: create a proper package_update_index_deb task.
Filip Zyzniewski
filip.zyzniewski at gmail.com
Wed Feb 23 20:42:28 UTC 2011
Until now the Packages.gz generation was hardcoded in rootfs_deb_do_rootfs.
Signed-off-by: Filip Zyzniewski <filip.zyzniewski at gmail.com>
---
classes/package_deb.bbclass | 28 ++++++++++++++++++++++++++++
classes/rootfs_deb.bbclass | 5 -----
2 files changed, 28 insertions(+), 5 deletions(-)
diff --git a/classes/package_deb.bbclass b/classes/package_deb.bbclass
index f94771c..9f2a342 100644
--- a/classes/package_deb.bbclass
+++ b/classes/package_deb.bbclass
@@ -276,3 +276,31 @@ python do_package_write_deb () {
do_package_write_deb[dirs] = "${D}"
addtask package_write_deb before do_package_write after do_package
+do_package_update_index_deb[lockfiles] = "${DEPLOY_DIR_DEB}.lock"
+do_package_update_index_deb[nostamp] = "1"
+do_package_update_index_deb[recrdeptask] += "do_package_write_deb"
+do_package_update_index_deb[depends] += "dpkg-native:do_populate_sysroot"
+
+do_package_update_index_deb () {
+ set -x
+
+ if [ ! -z "${DEPLOY_KEEP_PACKAGES}" ]; then
+ return
+ fi
+
+ cd "${DEPLOY_DIR_DEB}"
+ for arch in ${PACKAGE_ARCHS}; do
+ if [ -e "$arch" ] ; then
+ dpkg-scanpackages "$arch" | gzip > "$arch/Packages.gz"
+ fi
+ if [ -e "${BUILD_ARCH}-$arch-sdk" ] ; then
+ dpkg-scanpackages "${BUILD_ARCH}-$arch-sdk" | gzip > "${BUILD_ARCH}-$arch-sdk/Packages.gz"
+ fi
+ if [ -e "${SDK_SYS}-sdk-$arch" ] ; then
+ dpkg-scanpackages "${SDK_SYS}-sdk-$arch" | gzip > "${SDK_SYS}-sdk-$arch/Packages.gz"
+ fi
+ done
+ cd -
+}
+
+addtask package_update_index_deb before do_rootfs
diff --git a/classes/rootfs_deb.bbclass b/classes/rootfs_deb.bbclass
index 2130ad6..d5db816 100644
--- a/classes/rootfs_deb.bbclass
+++ b/classes/rootfs_deb.bbclass
@@ -24,11 +24,6 @@ fakeroot rootfs_deb_do_rootfs () {
continue;
fi
cd ${DEPLOY_DIR_DEB}/$arch
- rm -f Packages.gz Packages Packages.bz2
-
- # apt-native ignores Packages.bz2 unless /bin/bzip2 exists
- # on the build host, so stick with gzip
- dpkg-scanpackages . | gzip > Packages.gz
echo "Label: $arch" > Release
--
1.7.1
More information about the Openembedded-devel
mailing list