0

I am trying to install a package from my company's private Debian package repository, which is a Nexus artifact repository. This repository contains a package called ceres with two available versions: 1.13.0-dittobuild1 and 1.13.0-dittobuild2. That is, these packages have the same upstream version, but differ in the Debian version. 1.13.0-dittobuild2 is a newer (internal) build of the package.

I have another package, ditto-ar, that lists ceres=1.13.0-dittobuild1 as a dependency. That is, it depends on the older version of the ceres package.

When I try to install the ditto-ar package use apt-get (apt-get install ditto-ar), the installation fails with this output:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 ditto-ar : Depends: ceres (= 1.13.0-dittobuild1) but 1.13.0-dittobuild2 is to be installed
E: Unable to correct problems, you have held broken packages.

Why does it say that 1.13.0-dittobuild2 of the ceres package is to be installed, when ditto-ar specifically pins 1.13.0-dittobuild1, and why can't I install this package?

I am using Ubuntu 16.04.

1 Answer 1

1

That's not a "pinned" package, at least not in the same sense as apt pinning. Apt always prefers the highest version of a package, unless otherwise indicated to do so via the aforementioned apt pinning or manual version specification (something like apt install ditto-ar ceres=1.13.0-dittobuild1). Your package's dependency specification cannot override that.

5
  • So is there no use in specifying a version constraint in the package's dependencies?
    – mipadi
    Mar 27, 2020 at 4:31
  • I wouldn't say there's no use. It did function as intended - it prevented installing when the version constraint couldn't be met. If you hadn't specified that, it would have installed the newer version and your package might not be working as intended.
    – muru
    Mar 27, 2020 at 4:34
  • Thanks for the response. I suspected this might be the case but I couldn't find confirmation in the the documentation for Apt.
    – mipadi
    Mar 27, 2020 at 5:11
  • 1
    @mipadi the way apt selects a version is described in detail in man 5 apt_preferences (See "APT's Default Priority Assignments": "If two or more versions have the same priority, install the most recent one (that is, the one with the higher version number)."
    – muru
    Mar 27, 2020 at 5:48
  • Thank you! That is very useful info.
    – mipadi
    Mar 27, 2020 at 5:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .