LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-28-2017, 02:26 PM   #1
Chris.Bristol
Member
 
Registered: Jul 2011
Distribution: Ubuntu Budgie 19.10
Posts: 215

Rep: Reputation: 4
Defining Dependencies


I have written a simple application, and created a deb file, in which I need to make sure the necessary dependencies are specified.

I understand the principle of defining dependencies from the "quality" point of view but not the "quantity". I don't think I would need to mention the Linux core, but would I need to mention Python, as most distributions would include it? If I specify that an application like Hugin must be installed, will that encompass all its dependencies or would I need to work out what they are? How can I be sure it will run on several distributions without needing to install them to try it on?

I have read other threads on this subject but they are too advanced for me.
 
Old 03-28-2017, 06:22 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2019 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,316

Rep: Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578
If your application has an executable you can run :
$ dpkg-shlibdeps -t <executable>
... And the file debian/substvars will be created.


'dpkg-shlibdeps' is provided by the package 'dpkg-dev'.
 
Old 03-29-2017, 08:49 AM   #3
Chris.Bristol
Member
 
Registered: Jul 2011
Distribution: Ubuntu Budgie 19.10
Posts: 215

Original Poster
Rep: Reputation: 4
Quote:
Originally Posted by knudfl View Post
If your application has an executable..
No executable, it comprises two Python programs and a glade UI. It calls Hugins's align_image_stack command and the Python imports are:
from PIL import Image
from gi.repository import Gtk, GdkPixbuf
 
Old 03-29-2017, 09:11 AM   #4
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 19.1 MATE
Posts: 8,018
Blog Entries: 5

Rep: Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870
Speaking from a position of not being very knowledgeable on this, I would suggest first of all that you find similar Python-based packages and see how they declare their dependencies.

Your go-to source of info should be the Debian Policy Manual (https://www.debian.org/doc/debian-policy/). Work your way through the sections regarding binary packages, particularly the section on Depends et. al. (https://www.debian.org/doc/debian-po...l#s-binarydeps).

The Depends field should be used "if the depended-on package is required for the depending package to provide a significant amount of functionality."

Although I may be off the mark with this, I would suggest that any packages with a Priority of required or important (possibly even standard) don't need to be included in Depends as they are likely to already exist on a normal Debian system.

Of course, it will be difficult for you to determine exactly which versions of dependencies your package needs, if you want to include these. To avoid carrying out an enormous amount of research, it might be best to not include version numbers for packages where they're not required, and let any required modifications to those come out in the wash (e.g. a bug report saying that the package can't be run on a specific older system).

You don't need to include sub-dependencies - these will be taken care of by the dependencies themselves.

As for the testing, I would suggest that you ask other people to test the package on their different systems and/or set up VMs to do this. I don't think you can avoid such testing with a brand new package.

Last edited by hydrurga; 03-29-2017 at 09:39 AM. Reason: Grammar
 
Old 03-29-2017, 09:18 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2019 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,316

Rep: Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578
Re #3.

PIL/Image.py : Probably 'python-pil' https://packages.debian.org/search?s...words=Image.py

Gtk.py : python3-gi ? https://packages.debian.org/search?s...eywords=Gtk.py

GdkPixbuf(.py) : don't know.
If you can locate the file, please run $ dpkg -S <full path>
... to decide the package providing the file.

-
 
Old 03-30-2017, 11:55 AM   #6
Chris.Bristol
Member
 
Registered: Jul 2011
Distribution: Ubuntu Budgie 19.10
Posts: 215

Original Poster
Rep: Reputation: 4
Tak knudfl, but I don't understand what you are saying up to "If you can".

Quote:
If you can find the file..
I have found the deb file if that's what you meant.
Quote:
dpkg -S <full path>
The command results in "dpkg-query: no path found matching pattern..."

Last edited by Chris.Bristol; 03-30-2017 at 12:03 PM.
 
Old 03-30-2017, 01:07 PM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2019 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,316

Rep: Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578
Re #6

GdkPixbuf : I searched here https://packages.debian.org/search?s...s=GdkPixbuf.py
.. and found no match. But I don't know which suffix your {dependency GdkPixbuf} has, if any ...

There is gtk.gdk.Pixbuf http://www.pygtk.org/pygtk2reference...gdkpixbuf.html
and GdkPixbuf.Pixbuf https://lazka.github.io/pgi-docs/Gdk...es/Pixbuf.html
( Google search, keyword = python gdkpixbuf ).


-
 
Old 03-30-2017, 02:04 PM   #8
Chris.Bristol
Member
 
Registered: Jul 2011
Distribution: Ubuntu Budgie 19.10
Posts: 215

Original Poster
Rep: Reputation: 4
Quote:
Originally Posted by Chris.Bristol View Post
from gi.repository import Gtk, GdkPixbuf
From a http://askubuntu.com thread: "gi.repository is the Python module for PyGObject (which stands for Python GObject introspection) which holds Python bindings and support for the GTK+ 3 toolkit and for the GNOME apps."

Last edited by Chris.Bristol; 03-30-2017 at 02:08 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Defining a port in /etc/services shads2k5 Linux - Networking 1 11-09-2008 04:48 AM
defining environmental variables? sarayazdani LinuxQuestions.org Member Intro 1 08-05-2008 05:08 AM
I recieve a failed dependencies error, but I have all required dependencies Laptop2250 Linux - Software 15 02-03-2004 08:58 PM
Defining terms Kurt M. Weber General 1 10-25-2003 08:25 PM
Defining the Slices desbyleo Solaris / OpenSolaris 10 05-07-2003 10:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration