I'm using Ubuntu 14.04 64-bit. I am building a package with some dependencies including curl (refer build command later). I was assuming that until these dependencies are not installed my package would not be installed.
However when I install my package (when it's not already installed) using sudo dpkg -i <my_package_name>, it executes my before-install script (which returns with exit status 0) and later gives me an error that the dependencies are not installed but actually goes ahead and installs my package, my package files are untarred & present, as also the dpkg -l shows an entry for my package too !
Please see output below:
--
Executing command: sudo dpkg -i My_Install_Packager/mypack_1.0.1_amd64.deb
Selecting previously unselected package mypack.
(Reading database ... 1012608 files and directories currently installed.)
Preparing to unpack .../mypack_1.0.1_amd64.deb ...
Running pre_install_script_debian
pre_install_script_debian: Now installing
Unpacking mypack (1.0.1) ...
dpkg: dependency problems prevent configuration of mypack:
mypack depends on curl (>= 7.35.0); however:
Package curl is not installed.
dpkg: error processing package mypack (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mypack
ravishankar@ravishankar-desktop:~/tmp$ dpkg -l mypack
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-============-============-=================================
iU mypack 1.0.1 amd64 Good to install software
ravishankar@ravishankar-desktop:~/tmp$
----
Build command on Ubuntu 14.04 64-bit:
fpm -s tar -t deb -a amd64 -d "curl (>= 7.35.0)" -d "uuid (>=1.6.2)" -d "openssl (>=1.0.1f)" -n mypack -v 1.0.1 --maintainer "Ravi <
ra...@xxx.com>" --description "Good to install software" --url "
http://xxx.com/crr" --category Networking --vendor "Ravi<
ra...@xxxx.com>" --before-install pre_install_script_debian.sh --after-install post_install_script_debian.sh --after-remove post_remove_script_debian.sh --conflicts mypack --prefix /usr/xyz xyz.tar.gz
If I install the dependency package first and then run the dpkg -i command then predictably everything goes well. However this is creating a problem since it's my customer requirement that dependencies must be installed before our package is installed. This behaviour is correct in RPM though and it works well but not in Debian.
Can anyone please suggest what we should do to fix this issue?
Thanks,
Ravi