[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Proposal for possible consolidation of the packages


On Monday, November 25th, 2024 at 17:25, T Lee Davidson t.lee.davidson@xxxxxxxxx wrote:

Do the provided packages not be existing packages, first made, before the virtual package can use them?

Maybe my understanding of the matter is wrong, if so please do enlight me.

gbWilly

As an example, gambas3-dev is a virtual package:

https://packages.debian.org/bookworm/gambas3-dev

Hi Lee,

Thanks for finding me an example from debian official.

Let's analyse (I can as I have the official and my recipes available):

In recipe of official debian 3.18.0 they have: gambas3-devel.install and gambas3-devel.links (so NO gambas3-dev -> virtual you know)

debian-official.png

In control file they have:

Package: gambas3-devel
Architecture: any
Depends: ${misc:Depends},
         ${shlibs:Depends},
         gambas3-runtime (>= ${binary:Version})
Breaks: gambas3-dev (<< 3.15.0), gambas3-runtime (<< 3.15.0)
Replaces: gambas3-dev (<< 3.15.0)
Provides: gambas3-dev
Description: Gambas compilation tools
 Gambas is a free development environment based on a Basic interpreter
 with object extensions, like Visual Basic(tm) (but it is NOT a clone!).
 .
 This package includes the Gambas compiler, archiver and informer

So, there is a REAL package named gambas3-devel (see above .install file). There is NO REAL package gambas3-dev (so no gambas3-dev.install).

What happened here. Well we used to have gambas3-dev before 3.15.0 as it states in control file:

Breaks: gambas3-dev (<< 3.15.0), gambas3-runtime (<< 3.15.0)
Replaces: gambas3-dev (<< 3.15.0)
So, now (and here comes the IDE munix) if someone in gambas 3.12.3 build a debian package from his application, using the IDE packager, it will depend on gambas3-dev.
But 3.15.1 doesn't have gambas3-dev, as Benoit decided to rename it to gambas3-devel (same package and functionality, just another name).
So debian packages a gambas3-devel and  by mentioning the 'Provides: gambas3-dev' they ensure that the 3.12.2 (in IDE packaged) .deb file of the application will find it's dependency
The 'Replaces: gambas3-dev (<< 3.15.0)' ensures gambas3-devel is used instead of gambas-dev.
So, here it is used as a means of ensuring backward compatibility, but that is not what @munix is talking about.
Do note that above excerpt is from current Gambas3-3.18.0 recipe on official debian 12 and is outdated as we use gambas3-dev-tools (introduced in gambas 3.16.x if I'm right?)
This is my solution (from my gambas 3.18.4 recipe):
I do have a gambas3-dev and a gambas3-devel (both empty files). All is in gambas3-dev-tools now, same as was is gambas3-devel and gambas3-dev before that -> yes, Benoit renaming components ;-)
debian-gbwilly.png
In control file I have:
Package: gambas3-dev
Architecture: all
Section: devel
Depends: gambas3-dev-tools,
         ${misc:Depends}
Description: transitional package
 This is a transitional package. It can safely be removed.

Package: gambas3-devel
Architecture: all
Section: devel
Depends: gambas3-dev-tools,
         ${misc:Depends}
Description: transitional package
 This is a transitional package. It can safely be removed.

Package: gambas3-dev-tools
Architecture: any
Section: devel
Depends: ${misc:Depends},
         ${shlibs:Depends},
         gambas3-runtime (>= ${binary:Version})
Breaks: gambas3-dev (<< 3.18.3), gambas3-devel (<< 3.18.3)
Replaces: gambas3-dev, gambas3-devel
Conflicts: gambas3-dev (<< 3.18.3), gambas3-devel (<< 3.18.3)
Description: Gambas compilation tools
 Gambas is a free development environment based on a Basic interpreter
 with object extensions, like Visual Basic(tm) (but it is NOT a clone!).
 .
 This package includes all tools needed to compile Gambas projects without
 having to install the complete development environment. It includes the
 Gambas compiler, archiver, informer and help generator.
So, gambas3-dev and gambas3-devel are so called 'transitional packages'. They do make a gambas3-dev and gambas3-devel binary (for backward compatibilty) that simply installs gambas3-dev-tools instead (Replaces: gambas3-dev, gambas3-devel).
Now let's explain why not packaging according to specs is problematic.
I make a package debian package with IDE packager from my application for distribution to a non developer.
I do this on gambas 3.17.3 ubuntu from ppa.  It will package with gambas3-dev-tools as dependecy.
I install my debian  package on a debian 12 with official 3.18.0 gambas3.
It should work, right?.
Well, you have seen that official still used gambas3-devel, takes care of older gambas3-dev, but is unaware of gambas3-dev-tools.
So, now my application will fail to install. That is why packaging the correct package names is so important.
I hope a lot of packagers will read this and start getting aware of this.
And please join the discussion so that we can all learn and improve our understanding of these matters.
Enjoy


References:
Proposal for possible consolidation of the packagesmunix9 <munix9@xxxxxxxxxxxxxx>
Re: Proposal for possible consolidation of the packagesBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
Re: Proposal for possible consolidation of the packagesmunix9 <munix9@xxxxxxxxxxxxxx>
Re: Proposal for possible consolidation of the packagesBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
Re: Proposal for possible consolidation of the packagesgbWilly <gbWilly@xxxxxxxxxxxxxx>
Re: Proposal for possible consolidation of the packagesmunix9 <munix9@xxxxxxxxxxxxxx>
Re: Proposal for possible consolidation of the packagesgbWilly <gbWilly@xxxxxxxxxxxxxx>
Re: Proposal for possible consolidation of the packagesT Lee Davidson <t.lee.davidson@xxxxxxxxx>