diff options
| author | Richard Purdie <richard@openedhand.com> | 2008-05-18 14:12:15 +0000 |
|---|---|---|
| committer | Richard Purdie <richard@openedhand.com> | 2008-05-18 14:12:15 +0000 |
| commit | f0e154b9f9953aa03f651630b3daee0dc5b444c9 (patch) | |
| tree | 15ba35614baee4cadb020f09ee6006fba2bc6b2b /meta | |
| parent | 0b54064240579d05aeb673a398beed99e4acda45 (diff) | |
| download | poky-f0e154b9f9953aa03f651630b3daee0dc5b444c9.tar.gz | |
packaged-staging.bbclass: Execute staging_helper earlier to make sure the configuration file exists when needed. When installing the package after building make sure the control and list files are created. Use stage-manager-ipkg-build instead of needing ipkg-utils-native
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4488 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/classes/packaged-staging.bbclass | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/meta/classes/packaged-staging.bbclass b/meta/classes/packaged-staging.bbclass index 5cee0621a5..640d84fec5 100644 --- a/meta/classes/packaged-staging.bbclass +++ b/meta/classes/packaged-staging.bbclass | |||
| @@ -34,7 +34,6 @@ PSTAGE_NATIVEDEPENDS = "\ | |||
| 34 | libtool-native \ | 34 | libtool-native \ |
| 35 | automake-native \ | 35 | automake-native \ |
| 36 | update-alternatives-cworth-native \ | 36 | update-alternatives-cworth-native \ |
| 37 | ipkg-utils-native \ | ||
| 38 | opkg-native \ | 37 | opkg-native \ |
| 39 | m4-native \ | 38 | m4-native \ |
| 40 | quilt-native \ | 39 | quilt-native \ |
| @@ -74,8 +73,9 @@ python () { | |||
| 74 | bb.data.setVarFlag('do_populate_staging', 'depends', deps, d) | 73 | bb.data.setVarFlag('do_populate_staging', 'depends', deps, d) |
| 75 | 74 | ||
| 76 | deps = bb.data.getVarFlag('do_setscene', 'depends', d) or "" | 75 | deps = bb.data.getVarFlag('do_setscene', 'depends', d) or "" |
| 77 | deps += " opkg-native:do_populate_staging ipkg-utils-native:do_populate_staging" | 76 | deps += " opkg-native:do_populate_staging" |
| 78 | bb.data.setVarFlag('do_setscene', 'depends', deps, d) | 77 | bb.data.setVarFlag('do_setscene', 'depends', deps, d) |
| 78 | |||
| 79 | bb.data.setVar("PSTAGING_ACTIVE", "1", d) | 79 | bb.data.setVar("PSTAGING_ACTIVE", "1", d) |
| 80 | else: | 80 | else: |
| 81 | bb.data.setVar("PSTAGING_ACTIVE", "0", d) | 81 | bb.data.setVar("PSTAGING_ACTIVE", "0", d) |
| @@ -84,7 +84,7 @@ python () { | |||
| 84 | DEPLOY_DIR_PSTAGE = "${DEPLOY_DIR}/pstage" | 84 | DEPLOY_DIR_PSTAGE = "${DEPLOY_DIR}/pstage" |
| 85 | PSTAGE_MACHCONFIG = "${DEPLOY_DIR_PSTAGE}/opkg.conf" | 85 | PSTAGE_MACHCONFIG = "${DEPLOY_DIR_PSTAGE}/opkg.conf" |
| 86 | 86 | ||
| 87 | PSTAGE_BUILD_CMD = "${IPKGBUILDCMD}" | 87 | PSTAGE_BUILD_CMD = "stage-manager-ipkg-build -o 0 -g 0" |
| 88 | PSTAGE_INSTALL_CMD = "opkg-cl install -force-depends -f ${PSTAGE_MACHCONFIG} -o ${TMPDIR}" | 88 | PSTAGE_INSTALL_CMD = "opkg-cl install -force-depends -f ${PSTAGE_MACHCONFIG} -o ${TMPDIR}" |
| 89 | PSTAGE_UPDATE_CMD = "opkg-cl update -f ${PSTAGE_MACHCONFIG} -o ${TMPDIR}" | 89 | PSTAGE_UPDATE_CMD = "opkg-cl update -f ${PSTAGE_MACHCONFIG} -o ${TMPDIR}" |
| 90 | PSTAGE_REMOVE_CMD = "opkg-cl remove -force-depends -f ${PSTAGE_MACHCONFIG} -o ${TMPDIR}" | 90 | PSTAGE_REMOVE_CMD = "opkg-cl remove -force-depends -f ${PSTAGE_MACHCONFIG} -o ${TMPDIR}" |
| @@ -152,6 +152,7 @@ staging_helper () { | |||
| 152 | priority=$(expr $priority + 5) | 152 | priority=$(expr $priority + 5) |
| 153 | done | 153 | done |
| 154 | fi | 154 | fi |
| 155 | echo "dest root /" >> $conffile | ||
| 155 | } | 156 | } |
| 156 | 157 | ||
| 157 | PSTAGE_TASKS_COVERED = "fetch unpack munge patch configure qa_configure rig_locales compile sizecheck install deploy package populate_staging package_write_deb package_write_ipk package_write package_stage qa_staging" | 158 | PSTAGE_TASKS_COVERED = "fetch unpack munge patch configure qa_configure rig_locales compile sizecheck install deploy package populate_staging package_write_deb package_write_ipk package_write package_stage qa_staging" |
| @@ -164,6 +165,8 @@ python packagestage_scenefunc () { | |||
| 164 | if bb.data.getVar("PSTAGING_ACTIVE", d, 1) == "0": | 165 | if bb.data.getVar("PSTAGING_ACTIVE", d, 1) == "0": |
| 165 | return | 166 | return |
| 166 | 167 | ||
| 168 | bb.build.exec_func("staging_helper", d) | ||
| 169 | |||
| 167 | removepkg = bb.data.expand("${PSTAGE_PKGPN}", d) | 170 | removepkg = bb.data.expand("${PSTAGE_PKGPN}", d) |
| 168 | pstage_cleanpackage(removepkg, d) | 171 | pstage_cleanpackage(removepkg, d) |
| 169 | 172 | ||
| @@ -174,8 +177,6 @@ python packagestage_scenefunc () { | |||
| 174 | file = bb.data.getVar("FILE", d, True) | 177 | file = bb.data.getVar("FILE", d, True) |
| 175 | bb.debug(2, "Packaged staging active for %s\n" % file) | 178 | bb.debug(2, "Packaged staging active for %s\n" % file) |
| 176 | 179 | ||
| 177 | bb.build.exec_func("staging_helper", d) | ||
| 178 | |||
| 179 | # | 180 | # |
| 180 | # Install the staging package somewhere temporarily so we can extract the stamp files | 181 | # Install the staging package somewhere temporarily so we can extract the stamp files |
| 181 | # | 182 | # |
| @@ -327,6 +328,14 @@ staging_package_installer () { | |||
| 327 | echo "Status: install user installed" >> $STATUSFILE | 328 | echo "Status: install user installed" >> $STATUSFILE |
| 328 | echo "Architecture: ${PSTAGE_PKGARCH}" >> $STATUSFILE | 329 | echo "Architecture: ${PSTAGE_PKGARCH}" >> $STATUSFILE |
| 329 | echo "" >> $STATUSFILE | 330 | echo "" >> $STATUSFILE |
| 331 | |||
| 332 | CTRLFILE=${TMPDIR}${layout_libdir}/opkg/info/${PSTAGE_PKGPN}.control | ||
| 333 | echo "Package: ${PSTAGE_PKGPN}" > $CTRLFILE | ||
| 334 | echo "Version: ${PSTAGE_PKGVERSION}" >> $CTRLFILE | ||
| 335 | echo "Architecture: ${PSTAGE_PKGARCH}" >> $CTRLFILE | ||
| 336 | |||
| 337 | cd ${PSTAGE_TMPDIR_STAGE} | ||
| 338 | find -type f | grep -v ./CONTROL | sed -e 's/^\.//' > ${TMPDIR}${layout_libdir}/opkg/info/${PSTAGE_PKGPN}.list | ||
| 330 | } | 339 | } |
| 331 | 340 | ||
| 332 | python do_package_stage () { | 341 | python do_package_stage () { |
| @@ -405,6 +414,7 @@ do_package_stage_all () { | |||
| 405 | do_package_stage_all[recrdeptask] = "do_package_stage" | 414 | do_package_stage_all[recrdeptask] = "do_package_stage" |
| 406 | addtask package_stage_all after do_package_stage before do_build | 415 | addtask package_stage_all after do_package_stage before do_build |
| 407 | 416 | ||
| 417 | # FIXME - needed for BB_STAMP_POLICY = "whitelist" | ||
| 408 | #do_setscene[recrdeptask] = "do_setscene" | 418 | #do_setscene[recrdeptask] = "do_setscene" |
| 409 | 419 | ||
| 410 | 420 | ||
