* [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
* Re: [PATCH] dpkg-raw: take unmodified DEBIAN_DEPENDS for the package
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
0 siblings, 1 reply; 3+ messages in thread
From: Alexander Smirnov @ 2018-01-11 11:42 UTC (permalink / raw)
To: Henning Schild, isar-users; +Cc: Christian Storm
On 12/14/2017 08:36 PM, Henning Schild wrote:
> 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.
>
Applied to next, thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] dpkg-raw: take unmodified DEBIAN_DEPENDS for the package
2018-01-11 11:42 ` Alexander Smirnov
@ 2018-01-31 14:56 ` Claudius Heine
0 siblings, 0 replies; 3+ messages in thread
From: Claudius Heine @ 2018-01-31 14:56 UTC (permalink / raw)
To: Alexander Smirnov, Henning Schild, isar-users; +Cc: Christian Storm
Hi,
On 01/11/2018 12:42 PM, Alexander Smirnov wrote:
> On 12/14/2017 08:36 PM, Henning Schild wrote:
>> 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.
>>
>
> Applied to next, thanks!
>
I am now trying to convert my 'DEBIAN_DEPENDS' to the new format and I
found some issues doing it that way.
For instance if you are adding DEBAIN_DEPENDS inside a bbclass like this:
DEBIAN_DEPENDS += " \
jq, \
iptables, \
"
This results to the following entry in control file:
Depends: jq, iptables,
dpkg-deb does not seems to be happy with this.
That means that this patch in comparison the the one I submitted has
also the disadvantage of enforcing a less readable format in the recipe
file and expects special handling of the last ','.
So in the end, the complexity that we save here has to be spend
somewhere else.
Cheers,
Claudius
P.S.: My proposed patch needs a small change to handle tab characters
additional to spaces though.
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-54 Fax: (+49)-8142-66989-80 Email: ch@denx.de
^ 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