0


The scenario is as follows:
a. Have 2 main deb packages which has number of dependencies
b. Created single Packages file which contains all the information of both deb packages and their dependencies

Structure looks something like this:
test-package-1.0
       Depends on: |_ abc-1.2
                            |_ def-2.0
                            |_ ghi-5.0 and so on

test-package-2.0
       Depends on: |_ abc-1.1
                            |_ def-1.9
                            |_ ghi-4.9 and so on

My Packages file contain contents similar to below:
Package: test-package-1.0
Version: 1.0-6
Architecture: [architecture] Maintainer: Test Depends: abc (= 1.2), def (=2.0), ghi (=5.0) and so on

Package: test-package-2.0
Version: 1.0-6
Architecture: [architecture] Maintainer: Test Depends: abc (= 1.1), def (=1.9), ghi (=4.9) and so on

When I try to run apt-get install test-package-1.0, it installs fine with all required dependencies
BUT, when I try to run apt-get install test-package-2.0, it fails stating
The following packages have unmet dependencies:
test-package-2.0: Depends: abc (=1.1) but 1.2 is to be installed
                                             def (=1.9) but 2.0 is to be installed
                                             ghi (=4.9) but 5.0 is to be installed and so on.

Requirement: When I install test-package-2.0, it should install its dependencies successfully and not show higher version.

TIA

3
  • As for example abc-1.1 and abc-1.2 can't coexist then you get what you see, only one or the other can be installed at a time. abc1.2 & abc1.1 could coexist if they didn't install any same name files to same location
    – doug
    Sep 24, 2018 at 11:37
  • This looks like a classic case for Snap packaging instead of deb packaging. Snaps permit you to package any version (and dependencies) you wish, regardless of the latest version available to apt.
    – user535733
    Sep 24, 2018 at 12:01
  • @user535733 Thank you for the suggestion Sep 26, 2018 at 3:59

0

You must log in to answer this question.

Browse other questions tagged .