From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6735330377709125632 X-Received: by 2002:aa7:c1c7:: with SMTP id d7mr35086471edp.34.1568192259040; Wed, 11 Sep 2019 01:57:39 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a50:aeb3:: with SMTP id e48ls5390005edd.14.gmail; Wed, 11 Sep 2019 01:57:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqyj30+7RWMDVwjiV0WAdV++3vPWFkoLjnQyvysE1y6PvBwYNqVzaqstF6shPI/TXfip605q X-Received: by 2002:aa7:d2cd:: with SMTP id k13mr3319666edr.28.1568192258387; Wed, 11 Sep 2019 01:57:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568192258; cv=none; d=google.com; s=arc-20160816; b=Zer5fkGKvlrHC0ZuhwT7sqOiURkKFhXAJfZpwCjmC97OjecHpKa4cQXcrr/G1n+zdK 1JYQ8UZKykG7U500vYgbzjH0JCOGniQ0wbYXQxZJJ0xiA0dnx9vGDg99U7VByMUgxoYy 5EoTlBQ0R1uARxPTm3lbGQe4VhA3E23HLhFyTx+WbNJwIVFPALudoADwnTiqt6IAIiqN 4wr29DMmkJoIPbUGOo572d7j2Y1kOqtR7mQFl58CEvx9AU9zVv77YFzlNBN4X9N4oUQT /gj9fq68dmJCNOxi1wN0MIE5J+P/Bvg6vfO/cV/wZou5LElZS72Cqv/r2OS9ozULw1OM Nt+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:to:subject; bh=NWH8+OLLLbFGIauXBDkJCsKC6+gmumIuQTqZkCD7BS0=; b=YYKIUmzX43/Bhw8AyXH78vGCMUe70XEOj+Qz2DH8yu3/Y/3BsGJEa8u2DZIWMXabcF qrTqrgUv6RYMMXGH9U2BjM14Fb1+cK6TBHDugbTc0ZZwvePzFFDczoEUyPiw8Jc+Zw9T WpjrQYDxVZHXYeIONSbpVhmJk6QR4GuKlggddBbyl1Qd4Jw3J3Imz96ikgv5kOo/DU4B wflKDotKbYXOJ5ksD0+nEDfjyXEkxMx31bwwGGM7QtxSHPmtUbTNBYGiaK5qxDUzaPir INCv3p+1Q5BIKlNY5RF4ufRFnoe82jHpXLBGArhqPGiJpvVUEX5PtJgtW/RgFQvkuwg6 Ve1g== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.39 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from lizzard.sbs.de (lizzard.sbs.de. [194.138.37.39]) by gmr-mx.google.com with ESMTPS id r20si532725edp.3.2019.09.11.01.57.38 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Sep 2019 01:57:38 -0700 (PDT) Received-SPF: pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.39 as permitted sender) client-ip=194.138.37.39; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.39 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by lizzard.sbs.de (8.15.2/8.15.2) with ESMTPS id x8B8vc44019816 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 11 Sep 2019 10:57:38 +0200 Received: from [139.23.127.229] ([139.23.127.229]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id x8B8vZ7j002826; Wed, 11 Sep 2019 10:57:35 +0200 Subject: Re: [PATCH] Add support for supplying more types of debian package relationships To: "[ext] Dalamagkidis, Konstantinos" , "isar-users@googlegroups.com" , Henning Schild References: <20190911084136.19731-1-konstantinos.dalamagkidis@siemens.com> From: Jan Kiszka Message-ID: Date: Wed, 11 Sep 2019 10:57:34 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190911084136.19731-1-konstantinos.dalamagkidis@siemens.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: YgyT3c+SblY8 On 11.09.19 10:41, [ext] Dalamagkidis, Konstantinos wrote: > We need to be able to specify other package relationships, such as > Pre-Depends or Provides/Replaces/Conflicts. > > This change supports supplying DEBIAN_PREDEPENDS, DEBIAN_REPLACES, > DEBIAN_CONFLICTS and DEBIAN_PROVIDES, as well as bitbake-style RDEPENDS > or RDEPENDS_{PN} variables. The DEBIAN_* take priority. > > Signed-off-by: Konstantinos Dalamagkidis > --- > meta/classes/debianize.bbclass | 19 +++++++++++++++++++ > meta/classes/dpkg-raw.bbclass | 1 - > 2 files changed, 19 insertions(+), 1 deletion(-) > > diff --git a/meta/classes/debianize.bbclass b/meta/classes/debianize.bbclass > index ad3a98e..26002c5 100644 > --- a/meta/classes/debianize.bbclass > +++ b/meta/classes/debianize.bbclass > @@ -5,6 +5,21 @@ > > CHANGELOG_V ?= "${PV}" > > +DEBIAN_DEPENDS ??= "${@deb_get_relationship(d, 'RDEPENDS')}" > +DEBIAN_PREDEPENDS ??= "${@deb_get_relationship(d, 'RPREDEPENDS')}" > +DEBIAN_CONFLICTS ??= "${@deb_get_relationship(d, 'RCONFLICTS')}" > +DEBIAN_REPLACES ??= "${@deb_get_relationship(d, 'RREPLACES')}" > +DEBIAN_PROVIDES ??= "${@deb_get_relationship(d, 'RPROVIDES')}" > + > +def deb_get_relationship(d, relationship): > + rel = d.getVar(relationship + '_' + d.getVar('PN', True), True) > + if rel: > + return rel > + rel = d.getVar(relationship, True) > + if rel: > + return rel > + return "" > + > deb_add_changelog() { > timestamp=$(find ${S}/ -type f -not -path "${S}/debian/*" -printf "%T@\n"|sort -n -r|head -n 1) > if [ -n "${timestamp}" ]; then > @@ -42,6 +57,10 @@ Build-Depends: debhelper (>= ${compat}) > Package: ${PN} > Architecture: any > Depends: ${DEBIAN_DEPENDS} > +Pre-Depends: ${DEBIAN_PREDEPENDS} > +Replaces: ${DEBIAN_REPLACES} > +Conflicts: ${DEBIAN_CONFLICTS} > +Provides: ${DEBIAN_PROVIDES} > Description: ${DESCRIPTION} > EOF > } > diff --git a/meta/classes/dpkg-raw.bbclass b/meta/classes/dpkg-raw.bbclass > index ea03ea4..0c484fc 100644 > --- a/meta/classes/dpkg-raw.bbclass > +++ b/meta/classes/dpkg-raw.bbclass > @@ -5,7 +5,6 @@ > > inherit dpkg > > -DEBIAN_DEPENDS ?= "" > MAINTAINER ?= "Unknown maintainer " > > D = "${S}" > This, as well as your DPKG_ARCH patch, is enhancing and further establishing debianize.bbclase as an official interface. I already urged Henning to do that - which includes writing documentation for this. Your change here should extend that (not yet existing) documentation as well. One of the thing to consider while designing & enhancing the recipe API for debianize: We should not create something that is as complex as writing Debian control files directly - or even more complex than that. BTW, what kind of application packages are you generating for dpkg-raw? Jan -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux