public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Henning Schild <henning.schild@siemens.com>
To: isar-users@googlegroups.com
Cc: Claudius Heine <claudius.heine.ext@siemens.com>,
	Christian Storm <christian.storm@siemens.com>,
	Henning Schild <henning.schild@siemens.com>
Subject: [PATCH] dpkg-raw: take unmodified DEBIAN_DEPENDS for the package
Date: Thu, 14 Dec 2017 18:36:34 +0100	[thread overview]
Message-ID: <20171214173634.29877-1-henning.schild@siemens.com> (raw)

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


             reply	other threads:[~2017-12-14 17:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-14 17:36 Henning Schild [this message]
2018-01-11 11:42 ` Alexander Smirnov
2018-01-31 14:56   ` Claudius Heine

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171214173634.29877-1-henning.schild@siemens.com \
    --to=henning.schild@siemens.com \
    --cc=christian.storm@siemens.com \
    --cc=claudius.heine.ext@siemens.com \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox