public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] dpkg-raw: empty "Depends:" line is not allowed in .deb
@ 2017-12-13 12:51 Henning Schild
  2017-12-13 13:03 ` Claudius Heine
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Henning Schild @ 2017-12-13 12:51 UTC (permalink / raw)
  To: isar-users; +Cc: Claudius Heine, Henning Schild

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..1435e10 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


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

end of thread, other threads:[~2018-01-11 11:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-13 12:51 [PATCH] dpkg-raw: empty "Depends:" line is not allowed in .deb 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 ` [PATCH v2] " Henning Schild
2018-01-11 11:42   ` Alexander Smirnov
2017-12-14 17:44 ` [PATCH] " Henning Schild

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