* [PATCH] debianize: add support for DEBIAN_BUILD_CONFLICTS
@ 2026-11-20 12:33 'Badrikesh Prusty' via isar-users
0 siblings, 0 replies; only message in thread
From: 'Badrikesh Prusty' via isar-users @ 2026-11-20 12:33 UTC (permalink / raw)
To: isar-users; +Cc: Badrikesh Prusty
Allow recipes inheriting debianize (such as dpkg-raw) to specify
packages that must not be installed in the build environment by
introducing DEBIAN_BUILD_CONFLICTS.
This is useful in scenarios such as:
- Conflicting or alternative toolchains in the build chroot causing
compilation failures (e.g. both 'rustc' and 'rustc-web' getting
pulled in, leading to toolchain version mismatches):
DEBIAN_BUILD_CONFLICTS = "rustc-web"
- Build systems (such as CMake, Meson, or Autotools) auto-detecting
unwanted optional packages present in the chroot, altering the build
output, or breaking build reproducibility.
When defined, this emits the 'Build-Conflicts' field into the Source
stanza of the generated debian/control file. If unset or empty, the
field is omitted to prevent empty-field.
Signed-off-by: Badrikesh Prusty <badrikesh.prusty@siemens.com>
---
doc/user_manual.md | 1 +
meta/classes-recipe/debianize.bbclass | 7 +++++++
2 files changed, 8 insertions(+)
diff --git a/doc/user_manual.md b/doc/user_manual.md
index 199eb931..baf984bf 100644
--- a/doc/user_manual.md
+++ b/doc/user_manual.md
@@ -1065,6 +1065,7 @@ Other (optional) customization variables include:
- `DEBIAN_PROVIDES` - declare a virtual package to satisfy dependencies
- `DEBIAN_REPLACES` - to replace a package with another
- `DEBIAN_BREAKS` - Packages which break other packages
+ - `DEBIAN_BUILD_CONFLICTS` - Packages that must not be installed during the build (added to `Build-Conflicts`)
- `DEBIAN_BUILT_USING` - Used when a binary package includes parts of other source packages, f.e: by statically linking their libraries or embedding their
code or data during the build.
E.x: Built-Using: <name> (= <version>)
diff --git a/meta/classes-recipe/debianize.bbclass b/meta/classes-recipe/debianize.bbclass
index e483a52d..101e79c5 100644
--- a/meta/classes-recipe/debianize.bbclass
+++ b/meta/classes-recipe/debianize.bbclass
@@ -8,6 +8,7 @@
CHANGELOG_V ??= "${PV}"
DPKG_ARCH ??= "any"
DEBIAN_BUILD_DEPENDS ??= ""
+DEBIAN_BUILD_CONFLICTS ??= ""
DEBIAN_SECTION ??= "misc"
DEBIAN_DEPENDS ??= ""
DEBIAN_PROVIDES ??= ""
@@ -83,6 +84,7 @@ EOF
deb_create_control[vardeps] += "DEBIANIZE_BUILD_DEPENDS \
+ DEBIAN_BUILD_CONFLICTS \
DEBIAN_SECTION \
DEBIAN_DEPENDS \
DEBIAN_PROVIDES \
@@ -103,6 +105,11 @@ Standards-Version: ${DEBIAN_STANDARDS_VERSION}
Maintainer: ${MAINTAINER}
Build-Depends: ${@ deb_list_beautify(d, 'DEBIANIZE_BUILD_DEPENDS')}
EOF
+ # If a value has been set, add Build-Conflicts to the control file
+ if [ -n "${DEBIAN_BUILD_CONFLICTS}" ]; then
+ echo "Build-Conflicts: ${@ deb_list_beautify(d, 'DEBIAN_BUILD_CONFLICTS')}" >> \
+ ${S}/debian/control
+ fi
# If a value has been set, add the value of DEBIAN_RULES_REQUIRES_ROOT to
# the control file.
--
2.39.5
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/20261120123351.16764-1-badrikesh.prusty%40siemens.com.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-20 12:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-20 12:33 [PATCH] debianize: add support for DEBIAN_BUILD_CONFLICTS 'Badrikesh Prusty' via isar-users
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox