summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/packaged-staging.bbclass34
1 files changed, 29 insertions, 5 deletions
diff --git a/meta/classes/packaged-staging.bbclass b/meta/classes/packaged-staging.bbclass
index 144087fedc..094aa5979f 100644
--- a/meta/classes/packaged-staging.bbclass
+++ b/meta/classes/packaged-staging.bbclass
@@ -176,11 +176,17 @@ python packagestage_scenefunc () {
176 176
177 bb.build.exec_func("staging_helper", d) 177 bb.build.exec_func("staging_helper", d)
178 178
179 bb.note("Here 1\n")
180
179 removepkg = bb.data.expand("${PSTAGE_PKGPN}", d) 181 removepkg = bb.data.expand("${PSTAGE_PKGPN}", d)
180 pstage_cleanpackage(removepkg, d)
181 182
183 bb.note("Here 1.1\n")
184 pstage_cleanpackage(removepkg, d)
185 bb.note("Here 1.2\n")
182 stagepkg = bb.data.expand("${PSTAGE_PKG}", d) 186 stagepkg = bb.data.expand("${PSTAGE_PKG}", d)
183 187
188 bb.note("Here 2 %s\n"% stagepkg)
189
184 if os.path.exists(stagepkg): 190 if os.path.exists(stagepkg):
185 path = bb.data.getVar("PATH", d, 1) 191 path = bb.data.getVar("PATH", d, 1)
186 pstage_set_pkgmanager(d) 192 pstage_set_pkgmanager(d)
@@ -237,6 +243,8 @@ python packagestage_scenefunc () {
237 if ret != 0: 243 if ret != 0:
238 bb.note("Failure installing prestage package") 244 bb.note("Failure installing prestage package")
239 245
246 bb.build.exec_func("staging_package_libtoolhack", d)
247
240 bb.build.make_stamp("do_stage_package_populated", d) 248 bb.build.make_stamp("do_stage_package_populated", d)
241 else: 249 else:
242 bb.note("Staging package found but invalid for %s" % file) 250 bb.note("Staging package found but invalid for %s" % file)
@@ -320,11 +328,19 @@ staging_packager () {
320 echo "Architecture: ${PSTAGE_PKGARCH}" >> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control 328 echo "Architecture: ${PSTAGE_PKGARCH}" >> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control
321 329
322 # Protect against empty SRC_URI 330 # Protect against empty SRC_URI
323 if [ "${SRC_URI}" != "" ] ; then 331 srcuri="${SRC_URI}"
324 echo "Source: ${SRC_URI}" >> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control 332 if [ "$srcuri" == "" ]; then
325 else 333 srcuri="OpenEmbedded"
326 echo "Source: OpenEmbedded" >> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control
327 fi 334 fi
335 echo "Source: ${SRC_URI}" >> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control
336
337 # Deal with libtool not supporting sysroots
338 # Need to remove hardcoded paths and fix these when we install the
339 # staging packages.
340 # Could someone please add sysroot support to libtool!
341 for i in `find ${PSTAGE_TMPDIR_STAGE} -name "*.la" -type f` ; do \
342 sed -i -e s:${STAGING_DIR}:FIXMESTAGINGDIR:g $i
343 done
328 344
329 ${PSTAGE_BUILD_CMD} ${PSTAGE_TMPDIR_STAGE} ${DEPLOY_DIR_PSTAGE}/${PSTAGE_PKGPATH} 345 ${PSTAGE_BUILD_CMD} ${PSTAGE_TMPDIR_STAGE} ${DEPLOY_DIR_PSTAGE}/${PSTAGE_PKGPATH}
330} 346}
@@ -348,6 +364,14 @@ staging_package_installer () {
348 find -type f | grep -v ./CONTROL | sed -e 's/^\.//' > ${TMPDIR}${layout_libdir}/opkg/info/${PSTAGE_PKGPN}.list 364 find -type f | grep -v ./CONTROL | sed -e 's/^\.//' > ${TMPDIR}${layout_libdir}/opkg/info/${PSTAGE_PKGPN}.list
349} 365}
350 366
367staging_package_libtoolhack () {
368 # Deal with libtool not supporting sysroots and add our new
369 # staging location
370 for i in `find ${STAGING_DIR} -name "*.la" -type f` ; do \
371 sed -i -e s:FIXMESTAGINGDIR:${STAGING_DIR}:g $i
372 done
373}
374
351python do_package_stage () { 375python do_package_stage () {
352 if bb.data.getVar("PSTAGING_ACTIVE", d, 1) != "1": 376 if bb.data.getVar("PSTAGING_ACTIVE", d, 1) != "1":
353 return 377 return