From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6499063932287713280 X-Received: by 10.28.184.9 with SMTP id i9mr455914wmf.16.1513325332125; Fri, 15 Dec 2017 00:08:52 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 10.223.142.136 with SMTP id q8ls1674192wrb.8.gmail; Fri, 15 Dec 2017 00:08:51 -0800 (PST) X-Google-Smtp-Source: ACJfBouT5ZAAXHfHWmC+Hm46mGWtf6KR1mHcBol2gOy18l7EkYVDskmmfQAUkicedAnHP30zJ1Qj X-Received: by 10.28.207.1 with SMTP id f1mr536446wmg.11.1513325331804; Fri, 15 Dec 2017 00:08:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513325331; cv=none; d=google.com; s=arc-20160816; b=SeooymtFjgagkz6fkmG06jE0eYOiCcoioQS70kSMfhu7oh35K562Nofyto2pToaGa9 8393kFBFotJ2BD0u5VnntOz7xC5nOsBsb4+jwiaVxl3zE2xEFjn46kOKdrsv3C/bQIKb CNAgpUotr3y8WNO1zm/d/osKBXs9RqrEp/v/iiVI1KioeY0QZQGLVMyMqDqGiPXBJ9n7 JRxxIVooFb/u4kUfDiph1rvNX5VD/j2XBHdSUDsSh5g2RJJgGpxMe5OYnFuIv+bmpkG7 BEFjb7E0z0ufEU7vAyc+wJ+yoUHgcwfOCTPJhPVy8mSGBOYAwKJaBKgJfmnd9VcLWN3Z P3QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=V1GcweXQjipBCBB2QIlis+4cMVGJoF0iL8g0xF0xV14=; b=zuLmk1gCkXInyM/SBhgyjZrbc/6Xeuw7387K1wFNbptUeLCW1sfv+0884/2eaAvHLt Xm8eiR8crBiRaVFuxkiBsIGFNPyowvwcTg1HMChXQwY5X8LZtH8wtNGJlUJec8Yul7uc +M3TG98/T70AzGOSk3YJysd3Uta9r5E7RJpNOEOn1zwuk1xMZvaMKC64CJB11446wC/0 9Wz7Ck7VessQ0XugkXjn1P5lxn0BJ/gy89zmeUDDFl557yb56jzvudAKFdeic9EhTK6D dbRtPucFVsXkuKXtpg2jKuAODKGL584LmN+UUa2AldcOnBuUINerBeA1qFOtRg8uMtUh 7zxQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of ch@denx.de) smtp.mailfrom=ch@denx.de Return-Path: Received: from mail-out.m-online.net (mail-out.m-online.net. [212.18.0.9]) by gmr-mx.google.com with ESMTPS id a22si708150wmg.0.2017.12.15.00.08.51 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Dec 2017 00:08:51 -0800 (PST) Received-SPF: neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of ch@denx.de) client-ip=212.18.0.9; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of ch@denx.de) smtp.mailfrom=ch@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3yyjkC4SWrz1qrjh; Fri, 15 Dec 2017 09:08:51 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 3yyjkC49T3z1qqtt; Fri, 15 Dec 2017 09:08:51 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id fzQkY6Ba1fT9; Fri, 15 Dec 2017 09:08:50 +0100 (CET) X-Auth-Info: CxG0zwOMR2VmsqDletpOfZb0Tod76ajzP18eOXR2N7E= Received: from mail-internal.denx.de (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Fri, 15 Dec 2017 09:08:50 +0100 (CET) Received: from deneb.denx.de (deneb [10.0.20.1]) by mail-internal.denx.de (Postfix) with ESMTP id B819A180716; Fri, 15 Dec 2017 09:08:48 +0100 (CET) Received: by deneb.denx.de (Postfix, from userid 569) id AC176243D25; Fri, 15 Dec 2017 09:08:48 +0100 (CET) From: Claudius Heine To: isar-users@googlegroups.com Cc: Claudius Heine Subject: [RFC PATCH v2 1/1] meta/dpkg-raw: support for special debian package dependencies Date: Fri, 15 Dec 2017 09:08:42 +0100 Message-Id: <20171215080842.4075-2-ch@denx.de> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20171215080842.4075-1-ch@denx.de> References: <20171215080842.4075-1-ch@denx.de> X-TUID: emaM2a5Z0fHs 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 --- 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