Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have two Debian Packages that were previously made on our internal repository. They both share the same source code but are compiled with a distinct option, creating two separate binaries with the same libs. They were ment to be installed in separate servers

Therefore these two packages can't be installed at the same time because they try to install the same libs, hence the dpkg error "trying to overwrite /my/lib".

The problem : I need to install them on the same server.

Question is : What modification should I add to make them compatible ?

A few leads :

  • Create a 3rd package from the same source, compiling the whole source instead of two separate ones (but I guess this is the dirty way)

  • Find an option to tell these two packages can go along each other (but I don't know if it exists)

  • Create a "package-common" package containing the libs, man pages etc. from which the other 2 packages would depend on. (but I have no clue about how to compile the upstream source that way)

I understand this question is quite complicated to explain especially in a bad english, but I hope you will give me a few leads :)

Thanks community !

share|improve this question

2 Answers 2

up vote 5 down vote accepted

Your 3rd option is the most common. Often times you'll see it called -common or -base. It's done in plenty of places to provide separate library packages, as well as doc packages or addons. You're essentially creating multiple packages from the one source. Most of the -doc packages and -common packages as well as plenty of the lib* packages are creating this way.

e.g.

package-base
package-option1
package-option2

package-option1 and package-option2 both depend on package-base. That's the best and safest way to do that. There's plenty of examples of this in the Debian / Ubuntu package repositorites - apache2, php5, dhcp3, nagios3, vim

dh_make has support for creating these library packages or multiple binary packages from one source, it's worth checking out.

share|improve this answer

The common base package method as described by Phil is probably the best option, however if you mark one package as replacing the other it will allow package B to overwrite the files owned by package A. Of course, this is more of a quick fix then a long term solution.

share|improve this answer

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.