From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7340585807384674304 Date: Sun, 3 Mar 2024 22:08:54 -0800 (PST) From: srinu To: isar-users Message-Id: <81ce86e1-521f-44f5-977a-ce799eec10c1n@googlegroups.com> In-Reply-To: <20240228094135.3557447-1-srinuvasan.a@siemens.com> References: <20240228094135.3557447-1-srinuvasan.a@siemens.com> Subject: Re: [PATCH] debianize: introduce DEBIAN_PROVIDES and DEBIAN_REPLACES MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_38324_795512768.1709532534784" X-TUID: C3OPVmnxb/48 ------=_Part_38324_795512768.1709532534784 Content-Type: multipart/alternative; boundary="----=_Part_38325_1177832878.1709532534784" ------=_Part_38325_1177832878.1709532534784 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Uladzimir, Can you please merge this changes if no objection. Thanks, Srinu On Wednesday, February 28, 2024 at 3:11:58=E2=80=AFPM UTC+5:30=20 srinuv...@siemens.com wrote: > From: Srinuvasan A > > Allow setting the Provides and Replaces field for auto generated control= =20 > files, > with this changes now user can configure the provides and replaces in the= =20 > debian/control file. > > Recipes can simply setting the Provides and Replaces field now by definin= g=20 > the > DEBIAN_PROVIDES and DEBIAN_REPLACES variable. > > Signed-off-by: Srinuvasan A > --- > doc/user_manual.md | 4 ++++ > meta/classes/debianize.bbclass | 4 ++++ > 2 files changed, 8 insertions(+) > > diff --git a/doc/user_manual.md b/doc/user_manual.md > index 747b5ffe..bc730243 100644 > --- a/doc/user_manual.md > +++ b/doc/user_manual.md > @@ -936,6 +936,10 @@ For the variables please have a look at the previous= =20 > example, the following new > Have a look at the `example-raw` recipe to get an idea how the `dpkg-raw`= =20 > class can be used to customize your image. > Note that the package will be build using the whole debian package=20 > workflow, so your package will be checked by many debhelper scripts. If= =20 > those helpers point out quality issues it might be a good idea to fix the= m.=20 > But `example-raw` also shows how rules can still be violated. > > +Other (optional) customization variables include: > + - `DEBIAN_PROVIDES` - declare a virtual package to satisfy dependencies > + - `DEBIAN_REPLACES` - to replace a package with another > + > ### Prebuilt .deb packages from somewhere > > In some cases you might find yourself having a `.deb` that someone else= =20 > built, > diff --git a/meta/classes/debianize.bbclass=20 > b/meta/classes/debianize.bbclass > index 7de98673..adbb5da4 100644 > --- a/meta/classes/debianize.bbclass > +++ b/meta/classes/debianize.bbclass > @@ -8,6 +8,8 @@ CHANGELOG_V ??=3D "${PV}" > DPKG_ARCH ??=3D "any" > DEBIAN_BUILD_DEPENDS ??=3D "" > DEBIAN_DEPENDS ??=3D "" > +DEBIAN_PROVIDES ??=3D "" > +DEBIAN_REPLACES ??=3D "" > DEBIAN_CONFLICTS ??=3D "" > DEBIAN_MULTI_ARCH ??=3D "no" > DEBIAN_COMPAT ??=3D "10" > @@ -74,6 +76,8 @@ Build-Depends: debhelper-compat (=3D ${DEBIAN_COMPAT}),= =20 > ${DEBIAN_BUILD_DEPENDS} > Package: ${BPN} > Architecture: ${DPKG_ARCH} > Depends: ${DEBIAN_DEPENDS} > +Provides: ${DEBIAN_PROVIDES} > +Replaces: ${DEBIAN_REPLACES} > Conflicts: ${DEBIAN_CONFLICTS} > Multi-Arch: ${DEBIAN_MULTI_ARCH} > Description: ${DESCRIPTION} > --=20 > 2.34.1 > > ------=_Part_38325_1177832878.1709532534784 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Hi Uladzimir,

Can you please merge this changes = if no objection.

Thanks,
Srinu

On We= dnesday, February 28, 2024 at 3:11:58=E2=80=AFPM UTC+5:30 srinuv...@siemens= .com wrote:
F= rom: Srinuvasan A <srinuv...@= siemens.com>

Allow setting the Provides and Replaces field for auto generated contro= l files,
with this changes now user can configure the provides and replaces in t= he debian/control file.

Recipes can simply setting the Provides and Replaces field now by defin= ing the
DEBIAN_PROVIDES and DEBIAN_REPLACES variable.

Signed-off-by: Srinuvasan A <srinuv...@siemens.com>
---
doc/user_manual.md | 4 ++++
meta/classes/debianize.bbclass | 4 ++++
2 files changed, 8 insertions(+)

diff --git a/doc/user_manual.md b/doc/user_manual.md
index 747b5ffe..bc730243 100644
--- a/doc/user_manual.md
+++ b/doc/user_manual.md
@@ -936,6 +936,10 @@ For the variables please have a look at the previo= us example, the following new
Have a look at the `example-raw` recipe to get an idea how the `dpkg-r= aw` class can be used to customize your image.
Note that the package will be build using the whole debian package wor= kflow, so your package will be checked by many debhelper scripts. If those = helpers point out quality issues it might be a good idea to fix them. But `= example-raw` also shows how rules can still be violated.
=20
+Other (optional) customization variables include:
+ - `DEBIAN_PROVIDES` - declare a virtual package to satisfy dependenci= es
+ - `DEBIAN_REPLACES` - to replace a package with another
+
### Prebuilt .deb packages from somewhere
=20
In some cases you might find yourself having a `.deb` that someone els= e built,
diff --git a/meta/classes/debianize.bbclass b/meta/classes/debianize.bb= class
index 7de98673..adbb5da4 100644
--- a/meta/classes/debianize.bbclass
+++ b/meta/classes/debianize.bbclass
@@ -8,6 +8,8 @@ CHANGELOG_V ??=3D "${PV}"
DPKG_ARCH ??=3D "any"
DEBIAN_BUILD_DEPENDS ??=3D ""
DEBIAN_DEPENDS ??=3D ""
+DEBIAN_PROVIDES ??=3D ""
+DEBIAN_REPLACES ??=3D ""
DEBIAN_CONFLICTS ??=3D ""
DEBIAN_MULTI_ARCH ??=3D "no"
DEBIAN_COMPAT ??=3D "10"
@@ -74,6 +76,8 @@ Build-Depends: debhelper-compat (=3D ${DEBIAN_COMPAT}= ), ${DEBIAN_BUILD_DEPENDS}
Package: ${BPN}
Architecture: ${DPKG_ARCH}
Depends: ${DEBIAN_DEPENDS}
+Provides: ${DEBIAN_PROVIDES}
+Replaces: ${DEBIAN_REPLACES}
Conflicts: ${DEBIAN_CONFLICTS}
Multi-Arch: ${DEBIAN_MULTI_ARCH}
Description: ${DESCRIPTION}
--=20
2.34.1

------=_Part_38325_1177832878.1709532534784-- ------=_Part_38324_795512768.1709532534784--