Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

For example, imagine we have two packages: banana.deb and banana-common.deb. Inside banana.deb, we have some file banana.data, that is quite big and changes rarely. Both packages are currently at version 0.0.1, and banana depends on banana-common.

Now, because we want to reduce banana.deb size, we want to move that banana.data file into banana-common package. If I just do that (updating both versions to 0.0.2 and try to install with dpkg -i, I see the following:

$ sudo dpkg -i banana-common.deb banana.deb
...
dpkg: error processing banana-common.deb (--install):
 trying to overwrite '/usr/local/banana/banana.data', which is also in package banana 0.0.1

How can I fix it without removing the package first?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

In debian/control add something like

Conflicts: banana (< 0.0.2)

to the package section for banana-common.

share|improve this answer
    
And that would force dpkg to install them in parallel? –  Rogach Feb 20 '13 at 5:04
    
Man pages say something like "The package maintenance software will not allow conflicting packages to be installed at the same time". Wouldn't it just fail the installation? –  Rogach Feb 20 '13 at 5:08
    
It makes banana-common 0.0.2 to conflict with banana 0.0.1 but not banana 0.0.2. That makes the package manager first upgrades banana before it upgrades banana-common –  Florian Diesch Feb 20 '13 at 5:15
    
But new banana will be dependent on 0.0.2 version of banana-common, so it can't be upgraded, either. –  Rogach Feb 20 '13 at 5:16
    
sudo dpkg -i banana-common.deb banana.deb or apt-get upgrade will upgrade both in right order. –  Florian Diesch Feb 20 '13 at 5:21

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.