Conflict between Calibre and Liberation fonts (required by LibreOffice)

Today, when trying to update my Tumbleweed, I got this conflict message:

(...)
Checking for file conflicts: ....................................................................................................................................................[error]
Detected 12 file conflicts:

File /usr/share/calibre/fonts/liberation/LiberationMono-Bold.ttf
  from install of
     calibre-3.30.0-1.1.x86_64 (Main Repository (OSS))
  conflicts with file
     /usr/share/fonts/truetype/LiberationMono-Bold.ttf
  from package
     liberation-fonts-1.07.4-2.1.noarch (@System)

File /usr/share/calibre/fonts/liberation/LiberationMono-BoldItalic.ttf
  from install of
     calibre-3.30.0-1.1.x86_64 (Main Repository (OSS))
  conflicts with file
     /usr/share/fonts/truetype/LiberationMono-BoldItalic.ttf
  from package
     liberation-fonts-1.07.4-2.1.noarch (@System)

File /usr/share/calibre/fonts/liberation/LiberationMono-Italic.ttf
  from install of
     calibre-3.30.0-1.1.x86_64 (Main Repository (OSS))
  conflicts with file
     /usr/share/fonts/truetype/LiberationMono-Italic.ttf
  from package
     liberation-fonts-1.07.4-2.1.noarch (@System)

File /usr/share/calibre/fonts/liberation/LiberationMono-Regular.ttf
  from install of
     calibre-3.30.0-1.1.x86_64 (Main Repository (OSS))
  conflicts with file
     /usr/share/fonts/truetype/LiberationMono-Regular.ttf
  from package
     liberation-fonts-1.07.4-2.1.noarch (@System)

File /usr/share/calibre/fonts/liberation/LiberationSans-Bold.ttf
  from install of
     calibre-3.30.0-1.1.x86_64 (Main Repository (OSS))
  conflicts with file
     /usr/share/fonts/truetype/LiberationSans-Bold.ttf
  from package
     liberation-fonts-1.07.4-2.1.noarch (@System)

File /usr/share/calibre/fonts/liberation/LiberationSans-BoldItalic.ttf
  from install of
     calibre-3.30.0-1.1.x86_64 (Main Repository (OSS))
  conflicts with file
     /usr/share/fonts/truetype/LiberationSans-BoldItalic.ttf
  from package
     liberation-fonts-1.07.4-2.1.noarch (@System)

File /usr/share/calibre/fonts/liberation/LiberationSans-Italic.ttf
  from install of
     calibre-3.30.0-1.1.x86_64 (Main Repository (OSS))
  conflicts with file
     /usr/share/fonts/truetype/LiberationSans-Italic.ttf
  from package
     liberation-fonts-1.07.4-2.1.noarch (@System)

File /usr/share/calibre/fonts/liberation/LiberationSans-Regular.ttf
  from install of
     calibre-3.30.0-1.1.x86_64 (Main Repository (OSS))
  conflicts with file
     /usr/share/fonts/truetype/LiberationSans-Regular.ttf
  from package
     liberation-fonts-1.07.4-2.1.noarch (@System)

File /usr/share/calibre/fonts/liberation/LiberationSerif-Bold.ttf
  from install of
     calibre-3.30.0-1.1.x86_64 (Main Repository (OSS))
  conflicts with file
     /usr/share/fonts/truetype/LiberationSerif-Bold.ttf
  from package
     liberation-fonts-1.07.4-2.1.noarch (@System)

File /usr/share/calibre/fonts/liberation/LiberationSerif-BoldItalic.ttf
  from install of
     calibre-3.30.0-1.1.x86_64 (Main Repository (OSS))
  conflicts with file
     /usr/share/fonts/truetype/LiberationSerif-BoldItalic.ttf
  from package
     liberation-fonts-1.07.4-2.1.noarch (@System)

File /usr/share/calibre/fonts/liberation/LiberationSerif-Italic.ttf
  from install of
     calibre-3.30.0-1.1.x86_64 (Main Repository (OSS))
  conflicts with file
     /usr/share/fonts/truetype/LiberationSerif-Italic.ttf
  from package
     liberation-fonts-1.07.4-2.1.noarch (@System)

File /usr/share/calibre/fonts/liberation/LiberationSerif-Regular.ttf
  from install of
     calibre-3.30.0-1.1.x86_64 (Main Repository (OSS))
  conflicts with file
     /usr/share/fonts/truetype/LiberationSerif-Regular.ttf
  from package
     liberation-fonts-1.07.4-2.1.noarch (@System)

File conflicts happen when two packages attempt to install files with the same name but different contents. If you continue, conflicting files will be replaced losing the previous content.
Continue? [yes/no] (no):

Problem occurred during or after installation or removal of packages:
Installation aborted by user
Please see the above error message for a hint.

So I tried to uninstall the liberations-fonts package, only to discover that it would uninstall LibreOffice too:

cris@PolariSuse ~]$ sudo zypper rm liberation-fonts-1.07.4-2.1.noarch
[sudo] password for root:
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following 16 packages are going to be REMOVED:
  liberation-fonts libreoffice libreoffice-base libreoffice-calc libreoffice-calc-extensions libreoffice-draw libreoffice-filters-optional libreoffice-impress libreoffice-l10n-en
  libreoffice-l10n-it libreoffice-mailmerge libreoffice-math libreoffice-pyuno libreoffice-qt5 libreoffice-writer libreoffice-writer-extensions

16 packages to remove.
After the operation, 330,1 MiB will be freed.
Continue? [y/n/...? shows all options] (y): n

What is the best way to fix the problem?

Thank you in advance
Cris

what’s your repo list where are you getting calibre from

zypper lr -d

I’m on LEAP and I have both Calibre and LibreOffice co-installed with out an issue
from your error list

(...)
Checking for file conflicts: ....................................................................................................................................................[error]
Detected 12 file conflicts:

File /usr/share/calibre/fonts/liberation/LiberationMono-Bold.ttf
  from install of
     calibre-3.30.0-1.1.x86_64 (Main Repository (OSS))
  conflicts with file
     /usr/share/fonts/truetype/LiberationMono-Bold.ttf
  from package
     liberation-fonts-1.07.4-2.1.noarch (@System)

it looks like the liberation-fonts-1.04.4-2.1 is not from an active repository

update your system and try again

zypper dup

calibre was going to install those fonts from a different package you only showed us part of the zypper output

Current TW
libreoffice-6.1.0.3-1.4.x86_64
calibre-3.30.0-1.1.x86_64
liberation-fonts-1.07.4-2.1.noarch

With no conflicts.

Try:

 #  zypper dup --from http://download.opensuse.org/tumbleweed/repo/oss/

to fix whatever’s broken with your Tumbleweed.

I am getting the same file conflicts, on two computers that I have just updated.

I told it to go ahead anyway and ignore the conflicts – since both files in the conflict appear to be font definition files, I doubt that this will cause serious problems.

The are from the OSS repo. The “@System” shows because those are not part of the current update so zypper never checked where they came from.

It is probably a mistake for “calibre” to include the font definitions – it could instead just require the existing liberation-fonts package. Probably needs a bug report.

There’s something weird about this.

After the install completed, I ran Yast Software Management. I did a search for “calibre”. And I looked at the file list.

Those liberation font definition files are not in the file list shown for calibre.


% ls -l /usr/share/fonts/truetype/LiberationMono-Bold.ttf
-rw-r--r-- 1 root root 105848 Feb 14  2018 /usr/share/fonts/truetype/LiberationMono-Bold.ttf

That’s an old date if the file came from Calibre (which was updated today). I checked on another computer where Calibre is not installed, and got the identical “ls” output.

My conclusion: there was no file conflict. The file conflict message was bogus. That’s probably a “zypper” bug.

Now why did some people get this bogus conflict and others didn’t – hard to guess. However —

I did update “zypper” separately before updating everything else. So it could be a bug introduced into the latest “zypper”.

If the OP for this thread is still reading, it would be interesting to know whether he also separately updated “zypper”.

I have reported this as Bug 1106839.

nrickert is right, I have the exact same problem.
However, I resolved the problem by uninstalling Calibre. Reinstalling Calibre afterwards does not bring in Liberation Fonts, so the conflict is gone.
I think Calibre may have had a requirement for Liberation Fonts in the past, so those who have had Calibre for a long time (like me) have the conflict.

Cris

That bug report was close as WONTFIX. And there was actually a reasonable explanation provided.

Thank you nrickert for reporting back!
It actually explains a lot.

Cris