[oe] [PATCH, RFC]: automatically depend xz compressed URIs on xz-native [was: Re: bitbake: staging of binary over symlink breaks sysroot (lzma x xz)]

Khem Raj raj.khem at gmail.com
Mon Aug 2 17:49:10 UTC 2010


On (02/08/10 19:13), Bernhard Reutner-Fischer wrote:
> On Wed, Jul 28, 2010 at 04:32:08PM +0200, Bernhard Reutner-Fischer wrote:
> >On Wed, Jul 28, 2010 at 04:06:13PM +0200, Bernhard Reutner-Fischer wrote:
> >>On Wed, Jul 28, 2010 at 03:39:33PM +0200, Marco Cavallini wrote:
> >>>Stanislav Brabec ha scritto, Il 28/07/2010 11:30:
> 
> comments on the attached RFC patch?
> TIA,

-snip-
> @@ -420,12 +424,16 @@ python () {
>  
>      # unzip-native should already be staged before unpacking ZIP recipes
>      need_unzip = bb.data.getVar('NEED_UNZIP_FOR_UNPACK', d, 1)
> -    src_uri = bb.data.getVar('SRC_URI', d, 1)
>  
> -    if ".zip" in src_uri or need_unzip == "1":
> +    if ".zip" in srcuri or need_unzip == "1":
>          depends = bb.data.getVarFlag('do_unpack', 'depends', d) or ""
>          depends = depends + " unzip-native:do_populate_sysroot"
>          bb.data.setVarFlag('do_unpack', 'depends', depends, d)
> +    for ext in ['xz']: #['gzip', 'bzip2', 'xz']:
> +        if '.' + ext in srcuri:
> +            depends = bb.data.getVarFlag('do_unpack', 'depends', d) or ""
> +            depends += ' ' + ext + '-native:do_populate_sysroot'
> +            bb.data.setVarFlag('do_unpack', 'depends', depends, d)

what does above hunk do.

>  
>      # 'multimachine' handling
>      mach_arch = bb.data.getVar('MACHINE_ARCH', d, 1)
> diff --git a/classes/native.bbclass b/classes/native.bbclass
> index 3437836..9539d30 100644
> --- a/classes/native.bbclass
> +++ b/classes/native.bbclass
> @@ -88,8 +88,7 @@ PKG_CONFIG_PATH .= "${EXTRA_NATIVE_PKGCONFIG_PATH}"
>  PKG_CONFIG_SYSROOT_DIR = ""
>  
>  ORIG_DEPENDS := "${DEPENDS}"
> -
> -DEPENDS_virtclass-native ?= "${ORIG_DEPENDS}"
> +DEPENDS_virtclass-native ?= "${@base_conditional('INHIBIT_DEFAULT_DEPS_virtclass-native', '1', '', '${ORIG_DEPENDS}', d)}"
>  
>  python __anonymous () {
>      # If we've a legacy native do_stage, we need to neuter do_install
> @@ -111,7 +110,6 @@ python __anonymous () {
>              if dep.endswith("-cross"):
>                  newdeps.append(dep.replace("-cross", "-native"))
>              elif not dep.endswith("-native"):
> -     
>                  newdeps.append(dep + "-native")
>              else:
>                  newdeps.append(dep)
> @@ -121,9 +119,9 @@ python __anonymous () {
>              if prov.find(pn) != -1:
>                  continue
>              if not prov.endswith("-native"):
> -    
>                  provides = provides.replace(prov, prov + "-native")
>          bb.data.setVar("PROVIDES", provides, d)
>          bb.data.setVar("OVERRIDES", bb.data.getVar("OVERRIDES", d, False) + ":virtclass-native", d)
> +        bb.data.setVar("INHIBIT_AUTORECONF", bb.data.getVar("INHIBIT_AUTORECONF_virtclass-native", d, True), d)
>  }
>  
> diff --git a/recipes/grep/grep_2.6.3.bb b/recipes/grep/grep_2.6.3.bb
> index 981c062..5c76bab 100644
> --- a/recipes/grep/grep_2.6.3.bb
> +++ b/recipes/grep/grep_2.6.3.bb
> @@ -3,8 +3,6 @@ SECTION = "console/utils"
>  DESCRIPTION = "grep GNU utility"
>  PR = "r2"
>  
> -do_unpack[depends] += "xz-native:do_populate_sysroot"
> -
>  SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.xz \
>             file://uclibc-fix.patch"
>  
> diff --git a/recipes/xz/xz_4.999.9beta.bb b/recipes/xz/xz_4.999.9beta.bb
> index 8733023..fe49412 100644
> --- a/recipes/xz/xz_4.999.9beta.bb
> +++ b/recipes/xz/xz_4.999.9beta.bb
> @@ -1,5 +1,8 @@
> +INHIBIT_AUTOTOOLS_DEPS_virtclass-native = "1"
> +INHIBIT_DEFAULT_DEPS_virtclass-native = "1"
> +INHIBIT_AUTORECONF_virtclass-native = "1"
>  require xz.inc
> -PR = "${INC_PR}.0"
> +PR = "${INC_PR}.1"
>  SRC_URI = "http://tukaani.org/xz/xz-${PV}.tar.bz2;name=xz"
>  SRC_URI[xz.md5sum] = "cc4044fcc073b8bcf3164d1d0df82161"
>  SRC_URI[xz.sha256sum] = "330312c4397608d8b7be362cc7edbfeafa6101614bc2164d816ea767656aa15c"


in general approach looks ok to me. It would be nice that while you are at
it other packages which are needed early like git etc can use this approach
as well.

Thanks
-Khem




> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel





More information about the Openembedded-devel mailing list