From: Henning Schild <henning.schild@siemens.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: "[ext] Dalamagkidis,
Konstantinos" <konstantinos.dalamagkidis@siemens.com>,
"isar-users@googlegroups.com" <isar-users@googlegroups.com>
Subject: Re: [PATCH] Add support for supplying more types of debian package relationships
Date: Mon, 14 Oct 2019 18:49:34 +0200 [thread overview]
Message-ID: <20191014184934.61d46a69@md1za8fc.ad001.siemens.net> (raw)
In-Reply-To: <e054cb14-2d05-647e-ed71-e89291482300@siemens.com>
Am Wed, 11 Sep 2019 10:57:34 +0200
schrieb Jan Kiszka <jan.kiszka@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.
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
>
next prev parent reply other threads:[~2019-10-14 16:49 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
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 [this message]
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=20191014184934.61d46a69@md1za8fc.ad001.siemens.net \
--to=henning.schild@siemens.com \
--cc=isar-users@googlegroups.com \
--cc=jan.kiszka@siemens.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