0

I have created a deb package for an application created in Qt. I have included all the libraries that the application depends on, to be installed in a folder next to the application itself:

/usr/share/MyCompany/MyProduct/executable
/usr/share/MyCompany/MyProduct/Frameworks

Then exported LD_LIBRARY_PATH pointing to the Frameworks directory.

All perfect... Until I had to add QT Assistant, which requires additional libraries.

After checking the dependencies for Qt Assistant, I added all the required libraries, including libQtHelp.so.4 and libQtWebKit.so.4, in the same directory.

My deb is very simple, I create the structure desired then set the "install" to copy my files to the target directories.

blah_1/* /usr/share/MyCompany/MyProduct/

To create the package, I create the tar then

dh_make --copyright gpl -f ../blah-1.0.tar.gz 
dpkg-buildpackage -rfakeroot -me@mycompany.com

When running the installer on a clean (no Qt) system, I am getting dependency errors:

me:~$ sudo dpkg -i /path/blah_1.0-1_i386.deb 

Selecting previously unselected package blah.
(Reading database ... 141841 files and directories currently installed.)
Unpacking blah (from .../blah_1.0-1_i386.deb) ...
dpkg: dependency problems prevent configuration of blah:
 blah depends on libqt4-help (>= 4:4.8.0); however:
  Package libqt4-help is not installed.
 blah depends on libqtwebkit4 (>= 2.2~2011week36); however:
  Package libqtwebkit4 is not installed.
dpkg: error processing blah (--install):
 dependency problems - leaving unconfigured
Processing triggers for shared-mime-info ...
Processing triggers for desktop-file-utils ...
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf.index...
Processing triggers for gnome-menus ...
Errors were encountered while processing:
 blah

Unfortunately the system I am installing doesn't have (and will not have) internet access. How can I provide the packages required, in the same deb installer ?

Or, how can I disable checking for dependencies, since I am providing the required libs ?

(Ubuntu 12.04 if that is relevant)

Update: I ran

sudo dpkg -i --ignore-depends=libqt4-help,libqtwebkit4 /path/blah_1.0-1_i386.deb 

The program installed correctly and ran perfectly.

Inside the package, in the /DEBIAN/control, i see listed the unwanted dependencies.

After calling dh_make I had no dependencies in the control file.

The dpkg-buildpackage must have placed the dependencies after checking (likely for assistant).

Can I remove them somehow ? Can I put a flag somewhere not to include dependencies ?

Or... still.... can I add in my packaging thing the deb packages and is there a command I can give to pre-install as part of the package installation ?

If there is no solution.... I suppose I can provide a script to run the dpkg command as above, with ignore-depends, but then he package cannot be installed from the Software Center...

  • None of the 19 answers in the suggested question has anything to do with package creation, they all require users to install additional software - which I could provide but then it defeats the purpose of having a deb package hat includes all the dependencies. I am trying to REMOVE dependencies not to ADD MORE – Thalia Nov 13 '14 at 17:18
0

According to man dpkg-source:

-Dfield=value
      Override or add an output control file field.

And from man dpkg-buildpackage:

--source-option=opt
      Pass option opt to dpkg-source.

So perhaps you could override the Depends field thus:

dpkg-buildpackage --source-option='-DDepends=...' ...
  • Tried, did not work... thank you – Thalia Nov 13 '14 at 18:23
  • @Thalia I might be wrong in the syntax (it could be --source-option='DDepends=...' or something similar). – muru Nov 13 '14 at 18:28
  • 1
    I also tried --source-option='UDepends' with no effect – Thalia Nov 13 '14 at 19:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.