[oe] [PATCH 3/3] package_ipk: fix race in opkg.conf creation

Richard Purdie rpurdie at rpsys.net
Thu Jun 18 12:47:33 UTC 2009


On Wed, 2009-06-17 at 23:42 +0400, Roman I Khimov wrote:
> It's a very little race, but one can hit it anyway on concurrent image builds.
> ---
>  classes/package_ipk.bbclass |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/classes/package_ipk.bbclass b/classes/package_ipk.bbclass
> index d804c78..a4e6918 100644
> --- a/classes/package_ipk.bbclass
> +++ b/classes/package_ipk.bbclass
> @@ -3,7 +3,7 @@ inherit package
>  BOOTSTRAP_EXTRA_RDEPENDS += "opkg-collateral opkg"
>  IMAGE_PKGTYPE ?= "ipk"
>  
> -IPKGCONF_TARGET = "${STAGING_ETCDIR_NATIVE}/opkg.conf"
> +IPKGCONF_TARGET = "${STAGING_ETCDIR_NATIVE}/${PN}-opkg.conf"
>  IPKGCONF_SDK =  "${STAGING_ETCDIR_NATIVE}/opkg-sdk.conf"
>  IPKGCONF_CANSDK =  "${STAGING_ETCDIR_NATIVE}/opkg-canadian-sdk.conf"

Please don't do this, it will just create a ton of files all with the
same content. If you're really worried about racing, add proper locking
instead.

Cheers,

Richard






More information about the Openembedded-devel mailing list