[OE-core] [PATCH 36/44] package_rpm.bbclass: do not set the OS dynamically when building rpms

Mark Hatle mark.hatle at windriver.com
Fri Mar 10 16:57:16 UTC 2017


On 3/10/17 5:24 AM, Alexander Kanavin wrote:
> Packages need to contain just one value for the os field, otherwise
> rpm will refuse to install them if they don't match what is in
> /etc/rpm/platform.

How will this work with nativesdk for things like targeting mingw (windows),
darwin, or even alternative OS like Zephyr?

I'm thinking if 'linux-gnu' is invalid, then a simple conversion to 'linux'
would be better then hard coding everything to 'linux'.

--Mark

> Signed-off-by: Alexander Kanavin <alexander.kanavin at linux.intel.com>
> ---
>  meta/classes/package_rpm.bbclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
> index 2cdaae0ff25..4f4f8e4e11c 100644
> --- a/meta/classes/package_rpm.bbclass
> +++ b/meta/classes/package_rpm.bbclass
> @@ -692,7 +692,7 @@ python do_package_rpm () {
>      pkgwritedir = d.expand('${PKGWRITEDIRRPM}/${PACKAGE_ARCH_EXTEND}')
>      d.setVar('RPM_PKGWRITEDIR', pkgwritedir)
>      bb.debug(1, 'PKGWRITEDIR: %s' % d.getVar('RPM_PKGWRITEDIR'))
> -    pkgarch = d.expand('${PACKAGE_ARCH_EXTEND}${HOST_VENDOR}-${HOST_OS}')
> +    pkgarch = d.expand('${PACKAGE_ARCH_EXTEND}${HOST_VENDOR}-linux')
>      bb.utils.mkdirhier(pkgwritedir)
>      os.chmod(pkgwritedir, 0o755)
>  
> 




More information about the Openembedded-core mailing list