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 v2] dpkg-raw: empty "Depends:" line is not allowed in .deb
Date: Thu, 14 Dec 2017 18:34:41 +0100	[thread overview]
Message-ID: <20171214173441.29709-1-henning.schild@siemens.com> (raw)
In-Reply-To: <20171213125136.32599-1-henning.schild@siemens.com>

Apt-gat fails to install packages if the control-file contains a
"Depends:"-line without any packages listed.

  E: Problem parsing dependency Depends

So append that line to the control-file only if DEBIAN_DEPENDS was set
in the recipe. The user could still specify i.e. " " or anything
invalid, we do not check that. But now our default works.

Signed-off-by: Henning Schild <henning.schild@siemens.com>
Reported-by: Claudius Heine <ch@denx.de>
---
 meta/classes/dpkg-raw.bbclass | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/meta/classes/dpkg-raw.bbclass b/meta/classes/dpkg-raw.bbclass
index af62be4..ecd5c7f 100644
--- a/meta/classes/dpkg-raw.bbclass
+++ b/meta/classes/dpkg-raw.bbclass
@@ -26,10 +26,15 @@ do_deb_package_prepare() {
 		Section: misc
 		Priority: optional
 		Maintainer: ${MAINTAINER}
-		Depends: `echo ${DEBIAN_DEPENDS} | tr '[:blank:]' ','`
 		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
 	for t in pre post
 	do
 		for a in inst rm
-- 
2.13.6


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

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-13 12:51 [PATCH] " Henning Schild
2017-12-13 13:03 ` Claudius Heine
2017-12-13 13:35 ` Christian Storm
2017-12-13 13:45   ` Henning Schild
2017-12-13 14:14   ` Claudius Heine
2017-12-14 17:34 ` Henning Schild [this message]
2018-01-11 11:42   ` [PATCH v2] " Alexander Smirnov
2017-12-14 17:44 ` [PATCH] " Henning Schild

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=20171214173441.29709-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