Do transitive dependencies need to be specified in the control file?
Working on my karaf debian package
https://github.com/steinarb/karaf-debian
I tried adding two dependencies, libjna-java and libjna-platform-java to the debian/control file:
Depends: adduser, default-jre (>=1.8), libosgi-core-java (>=6), libjna-java (>=4.2.2), libjna-platform-java (>=4.2.2)
However, that wasn't enough to make apt-get pull in the dependencies:
root@lorenzo:~# apt-get install karaf
Reading package lists... Done
Building dependency tree
Reading state information... Done
karaf is already the newest version (4.1.4-9~9.30).
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
karaf : Depends: libjna-java (>= 4.2.2) but it is not going to be installed
Depends: libjna-platform-java (>= 4.2.2) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
root@lorenzo:~#
I tried the suggested command and it added libjna-jni as a dependency to
be installed:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
libjna-java libjna-jni libjna-platform-java
Suggested packages:
libjna-java-doc
The following NEW packages will be installed:
libjna-java libjna-jni libjna-platform-java
0 upgraded, 3 newly installed, 0 to remove and 13 not upgraded.
1 not fully installed or removed.
Need to get 968 kB of archives.
After this operation, 1,231 kB of additional disk space will be used.
Do you want to continue? [Y/n] n
Abort.
root@lorenzo:~#
Do I need to add transitive dependencies to my control file? (I thought
APT took care of that...?)
Or is this an artifact of the faked "repo" I use to test my package?
I have this in /etc/apt/sources.list:
deb file:///tmp repo/
I add new version of my package there by:
mv ~/git/karaf_4.1.4-9~9.30_all.deb /tmp/repo
(cd /tmp; dpkg-scanpackages repo >repo/Packages)
Is this simple faked APT repo the reason apt-get can't resolve the
libjna-jni dependency without help?
Thanks!
- Steinar
Reply to: