rootfs_ipk/package-index: created function to update deploy dirs and made package...
authorMarcin Juszkiewicz <hrw@openembedded.org>
Tue, 20 Feb 2007 08:12:47 +0000 (08:12 +0000)
committerMarcin Juszkiewicz <hrw@openembedded.org>
Tue, 20 Feb 2007 08:12:47 +0000 (08:12 +0000)
classes/rootfs_ipk.bbclass
packages/meta/package-index.bb

index 6fc7d8d..fdd42ee 100644 (file)
@@ -13,10 +13,8 @@ IPKG_ARGS = "-f ${T}/ipkg.conf -o ${IMAGE_ROOTFS}"
 
 PACKAGE_INSTALL += "ipkg ipkg-collateral"
 
-fakeroot rootfs_ipk_do_rootfs () {
+rootfs_ipk_do_indexes () {
        set -x
-               
-       mkdir -p ${IMAGE_ROOTFS}/dev
 
        ipkgarchs="${PACKAGE_ARCHS}"
 
@@ -33,14 +31,22 @@ fakeroot rootfs_ipk_do_rootfs () {
                        fi
                fi
        done
+}
+
+fakeroot rootfs_ipk_do_rootfs () {
+       set -x
 
+       rootfs_ipk_do_indexes
+
+       mkdir -p ${IMAGE_ROOTFS}/dev
        mkdir -p ${T}
-       priority=1
 
        #Add deploy/ipk as well for backward compat
        echo "src oe file:${DEPLOY_DIR_IPK}" > ${T}/ipkg.conf
+       ipkgarchs="${PACKAGE_ARCHS}"
 
-        for arch in $ipkgarchs; do
+       priority=1
+       for arch in $ipkgarchs; do
                echo "arch $arch $priority" >> ${T}/ipkg.conf
                priority=$(expr $priority + 5)
                if [ -e ${DEPLOY_DIR_IPK}/$arch/Packages ] ; then
index b28234f..842a02a 100644 (file)
@@ -1,13 +1,13 @@
 DESCRIPTION = "Rebuild the package index"
 LICENSE = "MIT"
-PR = "r2"
-
-DEPENDS = "ipkg-utils-native"
+PR = "r3"
 
 INHIBIT_DEFAULT_DEPS = "1"
 ALLOW_EMPTY = "1"
 PACKAGES = ""
 
+inherit rootfs_ipk
+
 do_fetch() {
 }
 do_unpack() {
@@ -27,17 +27,6 @@ do_build[nostamp] = "1"
 do_build[dirs] = "${DEPLOY_DIR_IPK}"
 do_build() {
        set -ex
-       touch Packages
-       ipkg-make-index -r Packages -p Packages -l Packages.filelist -m .
-
-       ipkgarchs="${PACKAGE_ARCHS}"
-
-        for arch in $ipkgarchs; do
-            if [ -e ${DEPLOY_DIR_IPK}/$arch/ ] ; then
-                 touch ${DEPLOY_DIR_IPK}/$arch/Packages
-                 ipkg-make-index -r ${DEPLOY_DIR_IPK}/$arch/Packages -p ${DEPLOY_DIR_IPK}/$arch/Packages -l ${DEPLOY_DIR_IPK}/$arch/Packages.filelist -m ${DEPLOY_DIR_IPK}/$arch/
-            fi
-        done
-
-        set +ex
+       rootfs_ipk_do_indexes
+       set +ex
 }