2

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?

1 Answer 1

2

In debian/control add something like

Conflicts: banana (<= 0.0.2)

to the package section for banana-common.

5
  • And that would force dpkg to install them in parallel?
    – Rogach
    Feb 20, 2013 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, 2013 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 Feb 20, 2013 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, 2013 at 5:16
  • sudo dpkg -i banana-common.deb banana.deb or apt-get upgrade will upgrade both in right order. Feb 20, 2013 at 5:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .