debianize: Introduce DEBIAN_MULTI_ARCH

Message ID 20231026150012.1396190-1-florian.bezdeka@siemens.com
State Accepted, archived
Headers show
Series debianize: Introduce DEBIAN_MULTI_ARCH | expand

Commit Message

Florian Bezdeka Oct. 26, 2023, 3 p.m. UTC
Allow setting the Multi-Arch field for auto generated control files. The
default is set to "no" which is the pre-multiarch behavior.

Recipes can simply overwrite the Multi-Arch field now by defining the
DEBIAN_MULTI_ARCH variable.

Signed-off-by: Florian Bezdeka <florian.bezdeka@siemens.com>
---
 meta/classes/debianize.bbclass | 2 ++
 1 file changed, 2 insertions(+)

Comments

MOESSBAUER, Felix Oct. 30, 2023, 2:30 a.m. UTC | #1
On Thu, 2023-10-26 at 17:00 +0200, 'Florian Bezdeka' via isar-users
wrote:
> Allow setting the Multi-Arch field for auto generated control files.
> The
> default is set to "no" which is the pre-multiarch behavior.
> 
> Recipes can simply overwrite the Multi-Arch field now by defining the
> DEBIAN_MULTI_ARCH variable.

Yes, this is definitely needed when building + co-installing library
packages for both target and target-compat arch.

Acked-by: Felix Moessbauer <felix.moessbauer@siemens.com>

Felix

> 
> Signed-off-by: Florian Bezdeka <florian.bezdeka@siemens.com>
> ---
>  meta/classes/debianize.bbclass | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/meta/classes/debianize.bbclass
> b/meta/classes/debianize.bbclass
> index f6ce11a2..16f3638d 100644
> --- a/meta/classes/debianize.bbclass
> +++ b/meta/classes/debianize.bbclass
> @@ -9,6 +9,7 @@ DPKG_ARCH ??= "any"
>  DEBIAN_BUILD_DEPENDS ??= ""
>  DEBIAN_DEPENDS ??= ""
>  DEBIAN_CONFLICTS ??= ""
> +DEBIAN_MULTI_ARCH ??= "no"
>  DESCRIPTION ??= "must not be empty"
>  MAINTAINER ??= "Unknown maintainer <unknown@example.com>"
>  
> @@ -77,6 +78,7 @@ Package: ${BPN}
>  Architecture: ${DPKG_ARCH}
>  Depends: ${DEBIAN_DEPENDS}
>  Conflicts: ${DEBIAN_CONFLICTS}
> +Multi-Arch: ${DEBIAN_MULTI_ARCH}
>  Description: ${DESCRIPTION}
>  EOF
>  }
> -- 
> 2.41.0
>
Uladzimir Bely Nov. 1, 2023, 7:13 a.m. UTC | #2
On Thu, 2023-10-26 at 17:00 +0200, 'Florian Bezdeka' via isar-users
wrote:
> Allow setting the Multi-Arch field for auto generated control files.
> The
> default is set to "no" which is the pre-multiarch behavior.
> 
> Recipes can simply overwrite the Multi-Arch field now by defining the
> DEBIAN_MULTI_ARCH variable.
> 
> Signed-off-by: Florian Bezdeka <florian.bezdeka@siemens.com>
> ---
>  meta/classes/debianize.bbclass | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/meta/classes/debianize.bbclass
> b/meta/classes/debianize.bbclass
> index f6ce11a2..16f3638d 100644
> --- a/meta/classes/debianize.bbclass
> +++ b/meta/classes/debianize.bbclass
> @@ -9,6 +9,7 @@ DPKG_ARCH ??= "any"
>  DEBIAN_BUILD_DEPENDS ??= ""
>  DEBIAN_DEPENDS ??= ""
>  DEBIAN_CONFLICTS ??= ""
> +DEBIAN_MULTI_ARCH ??= "no"
>  DESCRIPTION ??= "must not be empty"
>  MAINTAINER ??= "Unknown maintainer <unknown@example.com>"
>  
> @@ -77,6 +78,7 @@ Package: ${BPN}
>  Architecture: ${DPKG_ARCH}
>  Depends: ${DEBIAN_DEPENDS}
>  Conflicts: ${DEBIAN_CONFLICTS}
> +Multi-Arch: ${DEBIAN_MULTI_ARCH}
>  Description: ${DESCRIPTION}
>  EOF
>  }
> -- 
> 2.41.0
> 

Applied to next, thanks.

Patch

diff --git a/meta/classes/debianize.bbclass b/meta/classes/debianize.bbclass
index f6ce11a2..16f3638d 100644
--- a/meta/classes/debianize.bbclass
+++ b/meta/classes/debianize.bbclass
@@ -9,6 +9,7 @@  DPKG_ARCH ??= "any"
 DEBIAN_BUILD_DEPENDS ??= ""
 DEBIAN_DEPENDS ??= ""
 DEBIAN_CONFLICTS ??= ""
+DEBIAN_MULTI_ARCH ??= "no"
 DESCRIPTION ??= "must not be empty"
 MAINTAINER ??= "Unknown maintainer <unknown@example.com>"
 
@@ -77,6 +78,7 @@  Package: ${BPN}
 Architecture: ${DPKG_ARCH}
 Depends: ${DEBIAN_DEPENDS}
 Conflicts: ${DEBIAN_CONFLICTS}
+Multi-Arch: ${DEBIAN_MULTI_ARCH}
 Description: ${DESCRIPTION}
 EOF
 }