From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6735330377709125632 X-Received: by 2002:ac2:554c:: with SMTP id l12mr1560487lfk.10.1568711245780; Tue, 17 Sep 2019 02:07:25 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:ac2:4190:: with SMTP id z16ls250509lfh.7.gmail; Tue, 17 Sep 2019 02:07:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqyPOXBuEbRHF5pg9FQs+Pr4FMWunr6aF6plfXlzmK5THSb5bcVBr11MlXmZS0OOn335OiLk X-Received: by 2002:a19:7413:: with SMTP id v19mr1488275lfe.176.1568711245296; Tue, 17 Sep 2019 02:07:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568711245; cv=none; d=google.com; s=arc-20160816; b=qKwCz18658RcmigBPRwCfn0Zr9iAt4KPQ0BORl2Gooxzw6rnqDpgGS+KYBY2JCxf9c S/8ZNPZdkinsejbG+HCkCDpStOOH50cpV6sj9V3czgH8tcJgeLHamKf1ud2DivTmMoob yArFtQCaPBWODltt1DAsxRtKSIkhKoK+8j9Ujjq1b8y9A4LCXkLNxEjtnKgl/+86fPQR sU6VjuGcIaZe+dtDzU0wkZB4LwdiwCZxaME/iqZO7+tV5Ngrcx1dHlR89k700Qnx+iI3 hHCa89DI7zJ8b8Au8V6b0dPJ+1pqFxLzglTMZ1FmXy9+IU132872v/cWZkUvwZDl6UO9 eKvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date; bh=qVsahSPvJkeIVk0M8tmICABWA7gMjivR09lvhv33jUE=; b=kjKa+gJWIvASb2sWp8OSUnaF+NF3XRiaRf3nO80DvV6DxgJlVTbNVg7VT9nRsE2/3N u7gIZCZe8TfMmfT6PJKdQzSFcr6tnnE519dVu72tEQRNv5qOb4pp1Z65BbJjNZlyXrEb p59aAY/lrO0M3RplamMk/LvGnfocFGl40fCQ77qa2hKpD7vlrssglc+k5ZSBvdD0X3GT aArNGjwygkqCnqRPQNbeCi87GIX24CTYqcrhF5tc0DEdMrtAgtY4PNletzYGiGxDMhZV bnHgaNrxIxKm53SJhPPLTAIgmAjeQ2zmcYMC0ciy23f5mWVnJuK4MrUBuBBPIYZfqtWj WiBQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 194.138.37.39 as permitted sender) smtp.mailfrom=henning.schild@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 e8si105060ljo.4.2019.09.17.02.07.25 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Sep 2019 02:07:25 -0700 (PDT) Received-SPF: pass (google.com: domain of henning.schild@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 henning.schild@siemens.com designates 194.138.37.39 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by lizzard.sbs.de (8.15.2/8.15.2) with ESMTPS id x8H97OOC006175 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 17 Sep 2019 11:07:24 +0200 Received: from md1za8fc.ad001.siemens.net ([139.25.68.240]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id x8H97LVV006220; Tue, 17 Sep 2019 11:07:21 +0200 Date: Tue, 17 Sep 2019 11:07:21 +0200 From: Henning Schild To: "[ext] Dalamagkidis, Konstantinos" Cc: "isar-users@googlegroups.com" Subject: Re: [PATCH] Add support for supplying more types of debian package relationships Message-ID: <20190917110721.63311119@md1za8fc.ad001.siemens.net> In-Reply-To: <20190911084136.19731-1-konstantinos.dalamagkidis@siemens.com> References: <20190911084136.19731-1-konstantinos.dalamagkidis@siemens.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TUID: PKorR0+9EOYI Hi Konstantinos, improving the debianizer is a good idea in general. But i would shy away from trying to cover special corner cases. Not sure whether your changes are corner or common cases. Best practice is that your sources are already debianized, that benefits everyone, also outside of Isar. Special cases can already be modeled with deb_debianize if the generated special-case files are already in WORKDIR. So if is is a rare case it might be better to just carry that control file in FILESDIR and SRC_URI. Or you generate the file in your recipe. Could you explain how "common" that use-case is and why you prefer using Isar-generated debianization over having a (maybe generated) debianization in your sources? Henning Am Wed, 11 Sep 2019 08:41:45 +0000 schrieb "[ext] Dalamagkidis, Konstantinos" : > 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}"