public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] dpkg-raw: take unmodified DEBIAN_DEPENDS for the package
@ 2017-12-14 17:36 Henning Schild
  2018-01-11 11:42 ` Alexander Smirnov
  0 siblings, 1 reply; 3+ messages in thread
From: Henning Schild @ 2017-12-14 17:36 UTC (permalink / raw)
  To: isar-users; +Cc: Claudius Heine, Christian Storm, Henning Schild

To express advanced debian dependencies version numbers in brackets and
other constructs are allowed. In such cases you would also have spaces
in DEBIAN_DEPENDS which can not just get replaced with commas. Doing
that will create invalid "Depends:"-lines.

This patch just takes the string as found in the recipe. This way users
can express whatever they need and Isar does not need to know anything
about the semantics or syntax of that string.

This change means that anyone using dpkg-raw will have to comma-separate
their DEBIAN_DEPENDS. The change breaks backwards compatibility but
simplifies things and hopefully prevents further problems in that space.

Reported-by: Christian Storm <christian.storm@siemens.com>
Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
 meta-isar/recipes-app/example-raw/example-raw_0.2.bb | 2 +-
 meta/classes/dpkg-raw.bbclass                        | 8 ++------
 2 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/meta-isar/recipes-app/example-raw/example-raw_0.2.bb b/meta-isar/recipes-app/example-raw/example-raw_0.2.bb
index c431321..657430e 100644
--- a/meta-isar/recipes-app/example-raw/example-raw_0.2.bb
+++ b/meta-isar/recipes-app/example-raw/example-raw_0.2.bb
@@ -5,7 +5,7 @@
 
 DESCRIPTION = "Sample application for ISAR"
 MAINTAINER = "Your name here <you@domain.com>"
-DEBIAN_DEPENDS = "apt passwd"
+DEBIAN_DEPENDS = "apt (>= 0.4.2), passwd"
 
 SRC_URI = "file://README \
 	   file://postinst"
diff --git a/meta/classes/dpkg-raw.bbclass b/meta/classes/dpkg-raw.bbclass
index ecd5c7f..d132066 100644
--- a/meta/classes/dpkg-raw.bbclass
+++ b/meta/classes/dpkg-raw.bbclass
@@ -29,12 +29,8 @@ do_deb_package_prepare() {
 		Version: ${PV}+isar
 		Description: ${DESCRIPTION}
 	__EOF__
-	if [ "${DEBIAN_DEPENDS}" != "" ]
-	then
-		echo -n Depends: >> ${D}/DEBIAN/control
-		echo ${DEBIAN_DEPENDS} | tr '[:blank:]' ',' >> \
-			${D}/DEBIAN/control
-	fi
+	[ "${DEBIAN_DEPENDS}" != "" ] && echo "Depends: ${DEBIAN_DEPENDS}" >> \
+		${D}/DEBIAN/control
 	for t in pre post
 	do
 		for a in inst rm
-- 
2.13.6


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

end of thread, other threads:[~2018-01-31 14:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-14 17:36 [PATCH] dpkg-raw: take unmodified DEBIAN_DEPENDS for the package Henning Schild
2018-01-11 11:42 ` Alexander Smirnov
2018-01-31 14:56   ` Claudius Heine

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