From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6735330377709125632 X-Received: by 2002:a2e:1b56:: with SMTP id b83mr22999552ljb.107.1568192551569; Wed, 11 Sep 2019 02:02:31 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:ac2:46c1:: with SMTP id p1ls885839lfo.11.gmail; Wed, 11 Sep 2019 02:02:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqyiqE8iQXHkPx8vDz+iTQ2bJag4TVJ0Xh41YO7REtUOq2Ed/nBZiLV5XPGVyzwZgK+3TtGk X-Received: by 2002:a19:bed4:: with SMTP id o203mr22515076lff.110.1568192550958; Wed, 11 Sep 2019 02:02:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568192550; cv=none; d=google.com; s=arc-20160816; b=Wi3wkg6cwskDHD5J/yjSbz5oh7sY3pC9GcVYzQkor+fMkoJHNu8+1S637kFRDTnNK9 kPGwf8x+cLGSPI1V8g5CiH9eb5MZHuRROHAi5+thGK3KcKT+fK3W5NaNPHOjlIokvQbU 0E7/RNaVJinmFXvbr5ZHpE+nkG5pH1B5Fa62iH8HsRSRshQigTd9OmV3KiLDIfIhFTQD DwRG8qaY8/6m82t3XUflBtQoiZ+S2eGXcLXgxELYdIGXnoR6Y0aq+0xN0eLi2zVEGUOu blvp3LEPW/WrUgdBaTsOMMkUGChirUCBLoiHiV73XdusZzRvG04JMV73cscfX6jre79X zdyg== 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:references:to:from:subject; bh=fHpu42AdQPCdQGccIQf/MRkNhfyitgSTaxQhpeLMDVc=; b=bs5jXNwcBmTK/TAFXkWTNo3w2SLpC7LUnU/FiQXDAxZ9p97BAgkcQH1sleRDIsgoIo OaKEBW1NHOqGFN6ouCJjDGbUxDk9eiBDyiwgvfGGaFdKbSjQA78Uon9Rh9twD8zPJe57 ZZE5ZTX2I0Z4Y5vuwmfFB7HFKojvcvNx/8o0kE64EtTXLTnVouTLQbd9PkQ5M+GMAKuY RmI1lcVmkEnODUYh5AmeMdridhDCKNl1sBHvBDrgoXwQ18m69Bciux2uyHRpWJkC/PhQ r1y/O+zEwpKWpkHULJ5Q95zRKwtuMK5pIXHAH34jUj8n53XH7hJI/FEs4cy+HKpDk+sr s07A== 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 d3si1116088lfq.1.2019.09.11.02.02.30 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Sep 2019 02:02:30 -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 x8B92U5t028770 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 11 Sep 2019 11:02:30 +0200 Received: from [139.23.127.229] ([139.23.127.229]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id x8B92RJc013567; Wed, 11 Sep 2019 11:02:28 +0200 Subject: Re: [PATCH] Add support for supplying more types of debian package relationships From: Jan Kiszka To: "[ext] Dalamagkidis, Konstantinos" , "isar-users@googlegroups.com" , Henning Schild References: <20190911084136.19731-1-konstantinos.dalamagkidis@siemens.com> Message-ID: <938feed8-7b71-6191-4d64-0421a947a792@siemens.com> Date: Wed, 11 Sep 2019 11:02:26 +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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-TUID: +rtpqcIALaa5 On 11.09.19 10:57, Jan Kiszka wrote: > 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. > And, of course, we need some basic test cases as well. Jan > 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