Feedback

type to search

By: Asked from Austria

Packaging: "Depends" on a specific package version problematic if a newer package exists?

I package my own software as .debs so I can deploy it more easily. I’ve run across a problem regarding dependencies across package versions.

I’ve got two packages, call them foo and bar, both available in two versions, say 1.0 and 2.0. Package foo 1.0 depends on bar 1.0, so I’ve put something like this in the control file: Depends: bar (= 1.0).

However, installation now fails with a message similar to “foo: Depends: bar (= 1.0) but 2.0 is to be installed”

How do I do this?

1

hadret [ Moderator ]

Well, default action for apt, aptitude and so, is to install the most recent version (except experimental). You can, for example, install this package manually if it necessary needs to be 1.0 and can’t be 2.0.
But better way is to actually allow package to install newer version, so in depends it would be like that: bar (>= 1.0).

NN comments
peter.sabaini
-

I agree in general the more recent the package, the better. In this specific case however, I need this exact version for reasons internal to that package. Remember, this is not about an official package but my own software. I just use the Debian packaging mechanisms for easy deployment.

And the documentation AFAICT says depending on a specific version should work (eg. here: http://www.debian.org/doc/debian-policy/ch-relationships.html ), so I’m not sure whats wrong here.

d.paleino
-
.sabaini Depending on a specific version is supported, but it obviously fails if you already have a different version installed. Is this your case? If yes, downgrading the package (see my reply) should work (but be careful! ;))

peter.sabaini
-
.paleino nope, neither version of neither package is installed at first.

or Cancel
You need to join Debian to complete this action, click here to do so.