Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm refining our installer. The way it works is all our components are made into .deb files. The installer merely calls dpkg on all of them at once, along with their dependencies. This works great...as long as you install onto Ubuntu Linux 8.04.1. When installing in Ubuntu 8.04.3, for instance, the version of libc6-dev that might be installed is greater. But dpkg still seems to install our version of libc6-dev, despite the fact that a higher version is already installed. As you might expect, this causes problems.

What is the proper way to do this? Check every package we're about to install against the one on the system? I thought dpkg or apt did this for us. Secondly, why must this be as painful as it is? The target computers will not have Internet access, nor access to a mirror. We must be able to ship the application to be fully self-contained. Packages were supposed to free us from dependency hell and it seems like they are not.

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

The cleanest solution would seem to be to put all your packages in a local repository, like a package CD, and add a file in /etc/apt/sources.list.d to include the repository. Then it should be a simple matter of doing aptitude update; aptitude install <packages> to automatically get exactly the correct packages installed.

share|improve this answer
    
The file is located at /etc/apt/sources.list –  Telemachus Oct 1 '09 at 19:49
    
@Telemachus: Thank you; corrected. –  Teddy Oct 1 '09 at 20:58
2  
I do this for our product. I simply add a file to /etc/apt/sources.list.d. That way I don't have to modify the system installed file. It works great. –  Michael Kohne Oct 1 '09 at 21:01
    
@Michael Kohne: You're absolutely right, that's a much better way. I've changed my answer accordingly. –  Teddy Oct 1 '09 at 21:14
add comment

I don't believe that dpkg checks the version number of already-installed packages. apt should do this, but I don't believe it will install from disk unless you modify sources.list (typically located in /etc/apt/). If you add your source directory into the sources.list, you should just be able to run the standard apt-get install command, and all the checking it does for you.

share|improve this answer
    
/etc/apt, please, rather than \etc\apt –  Telemachus Oct 1 '09 at 19:48
    
Indeed, you are correct. This is what I get for using Windows all day. Fixed. –  Andrew Scagnelli Oct 1 '09 at 20:26
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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