From: Jan Kiszka <jan.kiszka@siemens.com>
To: "[ext] Dalamagkidis,
Konstantinos" <konstantinos.dalamagkidis@siemens.com>,
"isar-users@googlegroups.com" <isar-users@googlegroups.com>,
Henning Schild <henning.schild@siemens.com>
Subject: Re: [PATCH] Add support for supplying more types of debian package relationships
Date: Wed, 11 Sep 2019 10:57:34 +0200 [thread overview]
Message-ID: <e054cb14-2d05-647e-ed71-e89291482300@siemens.com> (raw)
In-Reply-To: <20190911084136.19731-1-konstantinos.dalamagkidis@siemens.com>
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 <konstantinos.dalamagkidis@siemens.com>
> ---
> 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 <unknown@example.com>"
>
> 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
next prev parent reply other threads:[~2019-09-11 8:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-11 8:41 Dalamagkidis, Konstantinos
2019-09-11 8:57 ` Jan Kiszka [this message]
2019-09-11 9:02 ` Jan Kiszka
2019-09-11 9:32 ` Dalamagkidis, Konstantinos
2019-10-14 17:01 ` Henning Schild
2019-10-15 10:38 ` Baurzhan Ismagulov
2019-09-13 8:32 ` Baurzhan Ismagulov
2019-10-14 16:49 ` Henning Schild
2019-09-17 9:07 ` Henning Schild
2019-10-08 11:01 ` Baurzhan Ismagulov
2019-10-08 11:26 ` Jan Kiszka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e054cb14-2d05-647e-ed71-e89291482300@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=henning.schild@siemens.com \
--cc=isar-users@googlegroups.com \
--cc=konstantinos.dalamagkidis@siemens.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox