[OE-core] [PATCH 1/8] rootfs_rpm: Add 50Meg to image size for zypper

Richard Purdie richard.purdie at linuxfoundation.org
Thu Jul 7 23:38:02 UTC 2011


On Thu, 2011-07-07 at 16:31 -0700, Saul Wold wrote:
> [YOCTO #1171]
> 
> Add /var space for zypper due to its space usage for db maintence

This hasn't been tested for opkg/deb and is missing something like:

ZYPPER_VAR_DB_SPACE ??= 0

I'd suggest we just change this to append " + 51200" to
IMAGE_ROOTFS_EXTRA_SPACE. I'd also like this only to happen when we're
actually installing zypper so the minimal images are unaffected...

Cheers,

Richard





> Signed-off-by: Saul Wold <sgw at linux.intel.com>
> ---
>  meta/classes/image_types.bbclass |    2 +-
>  meta/classes/rootfs_rpm.bbclass  |    5 +++++
>  2 files changed, 6 insertions(+), 1 deletions(-)
> 
> diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
> index 8c86227..505342d 100644
> --- a/meta/classes/image_types.bbclass
> +++ b/meta/classes/image_types.bbclass
> @@ -13,7 +13,7 @@ def get_imagecmds(d):
>  
>  runimagecmd () {
>  	# Image generation code for image type ${type}
> -	ROOTFS_SIZE=`du -ks ${IMAGE_ROOTFS}|awk '{size = $1 * ${IMAGE_OVERHEAD_FACTOR} + ${IMAGE_ROOTFS_EXTRA_SPACE}; OFMT = "%.0f" ; print (size > ${IMAGE_ROOTFS_SIZE} ? size : ${IMAGE_ROOTFS_SIZE}) }'`
> +	ROOTFS_SIZE=`du -ks ${IMAGE_ROOTFS}|awk '{size = $1 * ${IMAGE_OVERHEAD_FACTOR} + ${IMAGE_ROOTFS_EXTRA_SPACE} + ${ZYPPER_VAR_DB_SPACE}; OFMT = "%.0f" ; print (size > ${IMAGE_ROOTFS_SIZE} ? size : ${IMAGE_ROOTFS_SIZE}) }'`
>  	${cmd}
>  	cd ${DEPLOY_DIR_IMAGE}/
>  	rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.${type}
> diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
> index 3a11858..67c547f 100644
> --- a/meta/classes/rootfs_rpm.bbclass
> +++ b/meta/classes/rootfs_rpm.bbclass
> @@ -3,6 +3,10 @@
>  #
>  
>  ROOTFS_PKGMANAGE = "rpm zypper"
> +
> +# Add 50Meg of extra space for zypper database space
> +ZYPPER_VAR_DB_SPACE = "51200"
> +
>  # Postinstalls on device are handled within this class at present
>  ROOTFS_PKGMANAGE_BOOTSTRAP = ""
>  
> @@ -101,6 +105,7 @@ EOF
>  	export IPKG_OFFLINE_ROOT=${IMAGE_ROOTFS}
>  	export OPKG_OFFLINE_ROOT=${IMAGE_ROOTFS}
>  
> +
>  	${ROOTFS_POSTINSTALL_COMMAND}
>  
>  	mkdir -p ${IMAGE_ROOTFS}/etc/rpm-postinsts/






More information about the Openembedded-core mailing list