Patchworkβ [oe] opkg memory problem?

login
register
about
Submitter Graham Gower
Date 2009-11-05 22:49:24
Message ID <4AF35674.5040608@gmail.com>
Download mbox | patch
Permalink /patch/1230/
State Superseded, archived
Headers show

Comments

Graham Gower - 2009-11-05 22:49:24
01234567890123456789012345678901234567890123456789012345678901234567890123456789
When OE does 'opkg-cl install $EVERYTHING', all the memory leaks in opkg
start to accumulate. My guess is that somewhere a memory allocation failed
but was not checked for failure, then everything started to blow up.

Obviously, the memory leaks should be plugged (working on it...) and memory
allocations checked for failure (hopefully all sorted in opkg svn now). But
there's still a danger that large images will exhaust the supply of memory,
causing massive thrashing if nothing else.

The following is untested and only reduces that chances of this occuring,
but perhaps it makes sense to do something like this?
Graham Gower - 2009-11-05 22:51:11
2009/11/6 Graham Gower <graham.gower@gmail.com>:
> 01234567890123456789012345678901234567890123456789012345678901234567890123456789

Ha! Thunderbird needs a ruler, I keep forgetting to delete this after
I check I'm not going past 80 chars :)

Patch

diff --git a/classes/rootfs_ipk.bbclass b/classes/rootfs_ipk.bbclass
index 16dd511..58e5f45 100644
--- a/classes/rootfs_ipk.bbclass
+++ b/classes/rootfs_ipk.bbclass
@@ -53,9 +53,9 @@  fakeroot rootfs_ipk_do_rootfs () {
 			done
 		fi
 	fi
-	if [ ! -z "${PACKAGE_INSTALL}" ]; then
-		opkg-cl ${IPKG_ARGS} install ${PACKAGE_INSTALL}
-	fi
+	for i in ${PACKAGE_INSTALL}; do
+		opkg-cl ${IPKG_ARGS} install $i
+	done
 
 	export D=${IMAGE_ROOTFS}
 	export OFFLINE_ROOT=${IMAGE_ROOTFS}