From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6735330377709125632 X-Received: by 2002:a2e:934e:: with SMTP id m14mr12907340ljh.0.1571071777363; Mon, 14 Oct 2019 09:49:37 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:8915:: with SMTP id d21ls1887383lji.0.gmail; Mon, 14 Oct 2019 09:49:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqxiyjRNTm1x9OxZm2gIX1+jUsWXwv71DbQgQl208LiBUb3IiusL319dxLZQEdVFh3qcsPGt X-Received: by 2002:a2e:85cf:: with SMTP id h15mr19407776ljj.109.1571071776612; Mon, 14 Oct 2019 09:49:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571071776; cv=none; d=google.com; s=arc-20160816; b=OVBBG8WLDG+sy2RNEIxj/pbNMbC6uFND73GL4gH1z1RVCSBbrVXvMpc0EO+jg1INAy Ec60eHzRyARVAXl7UXwLGyKbYa5+nFAkTgP92+jRKvT5vyenpLMhSxVOwUOwr8WwmklJ Z/SHvDzf2izR7EW56VCwNthA19jxVDtNwOsUklxwUN+oBLRHAsiUhtg6UDD4r0gcAlUr uC/rerGsVDo1oISG5wKj2d455auyoAoXHcF47ei337x4fhlvN/x54Sf7T1AcWbVd1/4M XsCp7Amu4LqINCeEif2mXZkMs1HS5i2P8CVB1ZDMSB28OF4XGxe3U3Zo+EZXssCZscTD ro7A== 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=Ob2Jpdq94K4dE2GO+nmOuhvwR8aSf0GGs9ZcBGE7W6Q=; b=HBJ2pe7878dM2jw6Ww8hztxTnRIsL9HoUW2XNDA1FCFfd1IKZWF/8NeWWFhByWU02B fo/uKuViR335+r5pkKLQX45nUh7c/9JJvvcv1NZJbgB3254zZY3l79CbvLG3Lpx5rlW6 fOdBguq9VPjqsuGb7z4i1vjehq8BsSa1OPe2w6DPr0oVR4qW1iZrZS6pi8PUe+FCZj/x sJmk5IgBg0d3RwA0ra5MmAVWRKzlTr9OahS8Wg3l5zbYNcXuUrUOG4MFr+8QfEwImcgL Y0eLeU58wfYYfkforP5jhHTWNBhIw7aaIzUdV7p55lkE4rvWy7PaMc3gdetGOxyayOWT cULQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.2 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 thoth.sbs.de (thoth.sbs.de. [192.35.17.2]) by gmr-mx.google.com with ESMTPS id z9si880446ljj.4.2019.10.14.09.49.36 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Oct 2019 09:49:36 -0700 (PDT) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.2 as permitted sender) client-ip=192.35.17.2; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.2 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 thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id x9EGnZ7l007732 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 14 Oct 2019 18:49:35 +0200 Received: from md1za8fc.ad001.siemens.net ([139.25.0.8]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id x9EGnY7U026994; Mon, 14 Oct 2019 18:49:34 +0200 Date: Mon, 14 Oct 2019 18:49:34 +0200 From: Henning Schild To: Jan Kiszka Cc: "[ext] Dalamagkidis, Konstantinos" , "isar-users@googlegroups.com" Subject: Re: [PATCH] Add support for supplying more types of debian package relationships Message-ID: <20191014184934.61d46a69@md1za8fc.ad001.siemens.net> In-Reply-To: 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: 9l4+BDAZXKhV Am Wed, 11 Sep 2019 10:57:34 +0200 schrieb Jan Kiszka : > 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. I introduced it as a hidden feature because dpkg-raw needed it to go dpkg-buildpackage as well. At that time i knew it would be very useful outside of this context, and i bet the commit messages or discussions around it included that "insight". If we have reached the point where this becomes "official" i would be happy to write a few lines of documentation on it. But really everyone could do that if me not writing that blocks anyone. I know quite a few people that are using it and did not find major issues so it could be safe to assume it is good enough to begin with. Henning > 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 >