public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] meta/debianize: do not create compat file when new style is in control
@ 2021-07-13 14:09 Henning Schild
  2021-07-13 21:22 ` Henning Schild
  0 siblings, 1 reply; 4+ messages in thread
From: Henning Schild @ 2021-07-13 14:09 UTC (permalink / raw)
  To: isar-users; +Cc: Henning Schild, Adriaan Schmidt

The modern way to set the compat level is a Build-Depends on
debhelper-compat, in which case a compat file must not exist.

So if there is a control file using that new way, skip the creation of a
compat file.

Reported-by: Adriaan Schmidt <adriaan.schmidt@siemens.com>
Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
 meta/classes/debianize.bbclass | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/classes/debianize.bbclass b/meta/classes/debianize.bbclass
index dad1cb48fa40..878aaca89543 100644
--- a/meta/classes/debianize.bbclass
+++ b/meta/classes/debianize.bbclass
@@ -89,7 +89,11 @@ deb_debianize() {
 	if [ -f ${WORKDIR}/compat ]; then
 		install -v -m 644 ${WORKDIR}/compat ${S}/debian/compat
 	else
-		deb_create_compat
+		# new style compat level could be in control
+		# do not create a compat file in that case
+		if ! grep "debhelper-compat" ${WORKDIR}/control; then
+			deb_create_compat
+		fi
 	fi
 	# create the control-file if there is no control-file in WORKDIR
 	if [ -f ${WORKDIR}/control ]; then
-- 
2.31.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-07-14 11:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-13 14:09 [PATCH] meta/debianize: do not create compat file when new style is in control Henning Schild
2021-07-13 21:22 ` Henning Schild
2021-07-14  6:43   ` Jan Kiszka
2021-07-14 11:22     ` Henning Schild

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox