From: "Dalamagkidis, Konstantinos" <konstantinos.dalamagkidis@siemens.com>
To: "isar-users@googlegroups.com" <isar-users@googlegroups.com>
Cc: "Dalamagkidis, Konstantinos" <konstantinos.dalamagkidis@siemens.com>
Subject: [PATCH] Add support for supplying more types of debian package relationships
Date: Wed, 11 Sep 2019 08:41:45 +0000 [thread overview]
Message-ID: <20190911084136.19731-1-konstantinos.dalamagkidis@siemens.com> (raw)
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}"
--
2.20.1
next reply other threads:[~2019-09-11 8:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-11 8:41 Dalamagkidis, Konstantinos [this message]
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
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=20190911084136.19731-1-konstantinos.dalamagkidis@siemens.com \
--to=konstantinos.dalamagkidis@siemens.com \
--cc=isar-users@googlegroups.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