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

Re: Proper handling of meta packages



I wish to unsubscribe

From: Mark Olesen <Mark.Olesen@esi-group.com>
Sent: Monday, July 20, 2020 11:17:37 AM
To: debian-science <debian-science@lists.debian.org>
Subject: Proper handling of meta packages
 
As a further follow to my questions about structuring a package, I am
trying to determine how a meta-package should be correctly declared.

I've had a go at what I thought looked reasonable, but the "upgrade"
looks to be less than exactly smooth.

The base-level packages are things like the following:

- openfoam1912, openfoam1912-dev, openfoam1912-common,...
- openfoam2006, openfoam2006-dev, openfoam2006-common,...

these are structured to allow simultaneous installation without
collision and (as previously explained) there is a legitimate to support
multiple versions on the system.

I would, however, like to have a meta package to support upgrading when
a new production version appears.

The control for the backend packages look like this:

# version 1-2

Package: openfoam2006
Depends: openfoam2006-common (= ${binary:Version}), ...

Package: openfoam2006-dev
Depends: openfoam2006 (= ${binary:Version}), openfoam2006-tools (=
${binary:Version}),

In an earlier version I had 'Provides: openfoam' and 'Provides:
openfoam-dev' there, but that seemed to be quite the wrong approach.

For the meta-package, I declare interdependence within that
meta-package, and the dependence on the backend packages:

# openfoam (1912.200626-1) unstable; urgency=medium

Package: openfoam
Depends: openfoam1912 (>= 200626)

Package: openfoam-dev
Depends: openfoam (= ${binary:Version}), openfoam1912-dev (>= 200626)

I naively thought that this would just work when I upgraded the
meta-package:

Package: openfoam
Depends: openfoam2006 (>= 0)

Package: openfoam-dev
Depends: openfoam (= ${binary:Version}), openfoam2006-dev (>= 0)


Contrary to my expectation (or hope), an "apt upgrade" does not do the
upgrade. Instead I have to include the dependent packages as well:

apt update openfoam-dev openfoam openfoam2006 openfoam2006-dev

I don't know if this is a safety feature, if I misunderstood how to do
things, or if I'm simply expecting far too much.

Is there a good way to handle what I am attempting?

Cheers,

/mark


Reply to: