* [RFC PATCH v2 0/1] Special debian depends entries @ 2017-12-15 8:08 Claudius Heine 2017-12-15 8:08 ` [RFC PATCH v2 1/1] meta/dpkg-raw: support for special debian package dependencies Claudius Heine 2017-12-15 8:30 ` [RFC PATCH v2 0/1] Special debian depends entries Claudius Heine 0 siblings, 2 replies; 5+ messages in thread From: Claudius Heine @ 2017-12-15 8:08 UTC (permalink / raw) To: isar-users; +Cc: Claudius Heine Hi, here is a new version of my patch done with python code instead of shell code. Cheers, Claudius Claudius Heine (1): meta/dpkg-raw: support for special debian package dependencies meta/classes/dpkg-raw.bbclass | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) -- 2.14.3 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [RFC PATCH v2 1/1] meta/dpkg-raw: support for special debian package dependencies 2017-12-15 8:08 [RFC PATCH v2 0/1] Special debian depends entries Claudius Heine @ 2017-12-15 8:08 ` Claudius Heine 2017-12-15 8:30 ` [RFC PATCH v2 0/1] Special debian depends entries Claudius Heine 1 sibling, 0 replies; 5+ messages in thread From: Claudius Heine @ 2017-12-15 8:08 UTC (permalink / raw) To: isar-users; +Cc: Claudius Heine Now special debian dependencies can be specified in the recipe like this: DEBIAN_DEPENDS = "'libc (>= 2.16)' 'tar | bsdtar' systemd" and the package contains this 'Depends' entry: Depends: libc (>= 2.16), tar | bsdtar, systemd Signed-off-by: Claudius Heine <ch@denx.de> --- meta/classes/dpkg-raw.bbclass | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/meta/classes/dpkg-raw.bbclass b/meta/classes/dpkg-raw.bbclass index 1435e10..60c1170 100644 --- a/meta/classes/dpkg-raw.bbclass +++ b/meta/classes/dpkg-raw.bbclass @@ -19,6 +19,15 @@ addtask install after do_unpack before do_deb_package_prepare # so we can put hooks etc. in there already do_install[dirs] = "${D}/DEBIAN" +python () { + import re + debian_deps = d.getVar("DEBIAN_DEPENDS", True) + regex = re.compile(r"'([^']+)'|\"([^\"]+)\"|([^ ]+)") + debian_deps_comma = ", ".join([s for m in regex.finditer(debian_deps) + for s in m.groups() if s]) + d.setVar("DEBIAN_DEPENDS_COMMA", debian_deps_comma) +} + do_deb_package_prepare() { cat<<-__EOF__ > ${D}/DEBIAN/control Package: ${PN} @@ -32,8 +41,7 @@ do_deb_package_prepare() { if [ ${DEBIAN_DEPENDS} != "" ] then echo -n Depends: >> ${D}/DEBIAN/control - echo ${DEBIAN_DEPENDS} | tr '[:blank:]' ',' >> \ - ${D}/DEBIAN/control + echo " ${DEBIAN_DEPENDS_COMMA}" >> ${D}/DEBIAN/control fi for t in pre post do -- 2.14.3 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC PATCH v2 0/1] Special debian depends entries 2017-12-15 8:08 [RFC PATCH v2 0/1] Special debian depends entries Claudius Heine 2017-12-15 8:08 ` [RFC PATCH v2 1/1] meta/dpkg-raw: support for special debian package dependencies Claudius Heine @ 2017-12-15 8:30 ` Claudius Heine 2018-01-03 16:08 ` Henning Schild 1 sibling, 1 reply; 5+ messages in thread From: Claudius Heine @ 2017-12-15 8:30 UTC (permalink / raw) To: isar-users, Alexander Smirnov, Christian Storm, Jan Kiszka [-- Attachment #1: Type: text/plain, Size: 1201 bytes --] On Fri, 2017-12-15 at 09:08 +0100, Claudius Heine wrote: > Hi, > > here is a new version of my patch done with python code instead of > shell > code. Hi, Henning and me were currently discussing the options here, and we might need some referee to decide how to proceed: So the options are backwards compatibility vs. avoiding complexity. I think this code is not too complex, and backwards compatibility is nice to have. We don't know how many people use dpkg-raw and fixing it in a backwards compatible way saves time overall. Henning thinks that backwards compatibility is not an issue, because its easy to fix in the recipes and the complexity that goes with it has to be avoided, because there might be bugs inside, and we have to fix them over and over. Both vaild arguments IMO. Cheers, Claudius -- 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 PGP key: 6FF2 E59F 00C6 BC28 31D8 64C1 1173 CB19 9808 B153 Keyserver: hkp://pool.sks-keyservers.net [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC PATCH v2 0/1] Special debian depends entries 2017-12-15 8:30 ` [RFC PATCH v2 0/1] Special debian depends entries Claudius Heine @ 2018-01-03 16:08 ` Henning Schild 2018-01-09 13:34 ` Alexander Smirnov 0 siblings, 1 reply; 5+ messages in thread From: Henning Schild @ 2018-01-03 16:08 UTC (permalink / raw) To: Claudius Heine, Alexander Smirnov, Christian Storm, Jan Kiszka; +Cc: isar-users Am Fri, 15 Dec 2017 09:30:42 +0100 schrieb Claudius Heine <ch@denx.de>: > On Fri, 2017-12-15 at 09:08 +0100, Claudius Heine wrote: > > Hi, > > > > here is a new version of my patch done with python code instead of > > shell > > code. > > Hi, > > Henning and me were currently discussing the options here, and we > might need some referee to decide how to proceed: > > So the options are backwards compatibility vs. avoiding complexity. > > I think this code is not too complex, and backwards compatibility is > nice to have. We don't know how many people use dpkg-raw and fixing it > in a backwards compatible way saves time overall. > > Henning thinks that backwards compatibility is not an issue, because > its easy to fix in the recipes and the complexity that goes with it > has to be avoided, because there might be bugs inside, and we have to > fix them over and over. > > Both vaild arguments IMO. Alex, are you waiting for someone to jump in on this? Maybe you should just call it and merge one of the two patches. With the introduction of BASE_APT Isar might have to actually understand/use the contents of DEBIAN_DEPENDS. And in this case it might make sense to format it in a way that is bitbake-friendly and stick with space-separation and the patch Claudius suggested. Henning > Cheers, > Claudius > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC PATCH v2 0/1] Special debian depends entries 2018-01-03 16:08 ` Henning Schild @ 2018-01-09 13:34 ` Alexander Smirnov 0 siblings, 0 replies; 5+ messages in thread From: Alexander Smirnov @ 2018-01-09 13:34 UTC (permalink / raw) To: Henning Schild, Claudius Heine, Christian Storm, Jan Kiszka; +Cc: isar-users Hi all, On 01/03/2018 07:08 PM, Henning Schild wrote: > Am Fri, 15 Dec 2017 09:30:42 +0100 > schrieb Claudius Heine <ch@denx.de>: > >> On Fri, 2017-12-15 at 09:08 +0100, Claudius Heine wrote: >>> Hi, >>> >>> here is a new version of my patch done with python code instead of >>> shell >>> code. >> >> Hi, >> >> Henning and me were currently discussing the options here, and we >> might need some referee to decide how to proceed: >> >> So the options are backwards compatibility vs. avoiding complexity. >> >> I think this code is not too complex, and backwards compatibility is >> nice to have. We don't know how many people use dpkg-raw and fixing it >> in a backwards compatible way saves time overall. >> In my opinion backward compatibility is not so critical for current implementation, especially because current DEBIAN_DEPENDS is a bit 'inconsistent' due to missed version specificators. So in theory in some environment the build could failed due to invalid apt version. Therefor I'd prefer to force Isar users to fix their recipes now. >> Henning thinks that backwards compatibility is not an issue, because >> its easy to fix in the recipes and the complexity that goes with it >> has to be avoided, because there might be bugs inside, and we have to >> fix them over and over. >> >> Both vaild arguments IMO. > > Alex, are you waiting for someone to jump in on this? Maybe you should > just call it and merge one of the two patches. Working on base-apt I've faced with the problem how to get dependency tree for current build. So atm I'm thinking about generalization of DEBIAN_DEPENDS variable and moving this code (patching debian/control) to dpkg-base class. Do you think it makes sense for now? > > With the introduction of BASE_APT Isar might have to actually > understand/use the contents of DEBIAN_DEPENDS. And in this case it might > make sense to format it in a way that is bitbake-friendly and stick > with space-separation and the patch Claudius suggested. > base-apt is created using multistrap, so it's a good question which input format multistrap accepts. Probably no one from proposed formats will work as it is. Alex > Henning > >> Cheers, >> Claudius >> > ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-01-09 13:34 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2017-12-15 8:08 [RFC PATCH v2 0/1] Special debian depends entries Claudius Heine 2017-12-15 8:08 ` [RFC PATCH v2 1/1] meta/dpkg-raw: support for special debian package dependencies Claudius Heine 2017-12-15 8:30 ` [RFC PATCH v2 0/1] Special debian depends entries Claudius Heine 2018-01-03 16:08 ` Henning Schild 2018-01-09 13:34 ` Alexander Smirnov
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox