SOLVED: "ttf-mscorefonts-installer" Dependency Question

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
EvilSupahFly
Level 3
Level 3
Posts: 126
Joined: Sat May 24, 2014 11:10 am
Location: Mordor

SOLVED: "ttf-mscorefonts-installer" Dependency Question

Post by EvilSupahFly »

I may be the exception to the norm here, but I have multiple WINE prefixes which all run different things - mostly games. Rather than install install the Microsoft Core Fonts in each prefix and chew up disk space, it makes more sense to install them once at the main system level.

However, on Mint, when you try to install ttf-mscorefonts-installer you are also prompted to install 8 other packages:
  • python3-debconf
  • python3-distro-info
  • python3-distupgrade
  • python3-update-manager
  • ubuntu-advantage-tools
  • ubuntu-release-upgrader-core
  • update-manager-core
  • update-notifier-common
As I understand it, this happens because the ttf-mscorefonts-installer package in the Ubuntu repository depends on update-notifier-common which itself indirectly depends on the rest of the mentioned packages even though all these extras aren't actually required for those TTFs to work and probably shouldn't be marked as dependencies (at least for Mint users), even though most Ubuntu users would probably already have these installed, and wouldn't notice.

On top of that, the .deb can be obtained upstream from Debian directly without the extra packages and installed locally with gdebi, dpkg, or any other Debian package manager you happen to have laying around, and it doesn't break anything - I know, I've done it.

Technically, you can probably get around this by passing --no-install-recommends to APT, but that's more of a short-term solution. Is there a way to remove this dependency hell from the core fonts through Mint's own repos, or does this have to be addressed by Canonical?
Last edited by LockBot on Fri Dec 01, 2023 11:00 pm, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
My Frankensteined Black Beast:
Intel Core i7-4770S CPU @ 3.10GHz × 8 x64
NVIDIA GeForce GTX 1660, 2 monitors @ 1920x1080
E220x Gigabit Ethernet 1000 Mbps
Storage: 13.01 TB
Intel 8 C220 HD Audio, full 5.1 Surround
User avatar
Termy
Level 12
Level 12
Posts: 4248
Joined: Mon Sep 04, 2017 8:49 pm
Location: UK
Contact:

Re: "ttf-mscorefonts-installer" Dependency Question

Post by Termy »

EvilSupahFly wrote: Wed May 31, 2023 5:52 pm Technically, you can probably get around this by passing --no-install-recommends to APT, but that's more of a short-term solution. Is there a way to remove this dependency hell from the core fonts through Mint's own repos, or does this have to be addressed by Canonical?
It's not dependency hell, it's just the nature of dependencies and distributions based on other distributions. You can ignore the recommended packages with the flag you included. It's quite a normal thing to opt to use or ignore recommended and/or suggested packages. It's just that by default, all recommended packages are installed. You can disable this, but I don't generally recommend it, as you usually want the recommended packages.

Regarding a more widespread solution, it's possible the Linux Mint developers can set up a rule that disables recommended packages for specifically that package. Given it's easy enough to just select not to install the recommended packages, I can't see this happening anytime soon.
I'm also Terminalforlife on GitHub.
User avatar
EvilSupahFly
Level 3
Level 3
Posts: 126
Joined: Sat May 24, 2014 11:10 am
Location: Mordor

Re: "ttf-mscorefonts-installer" Dependency Question

Post by EvilSupahFly »

I understand why certain dependencies would be required for Ubuntu users, which aren't for derivative distribution users, but these are just TTFs. I don't understand why they even need to depend on these other things, even on a pure Ubuntu install. Other font packages don't trigger these dependencies, so it doesn't make sense, especially given the availability of the same package, minus any dependencies, on Debian's upstream FTP server.

I mean, I suppose it doesn't actually matter, ultimately. It just feels like someone went out of their way to make it more complicated than it needs to be, and that annoys me.
Last edited by EvilSupahFly on Thu Jun 01, 2023 9:19 pm, edited 1 time in total.
My Frankensteined Black Beast:
Intel Core i7-4770S CPU @ 3.10GHz × 8 x64
NVIDIA GeForce GTX 1660, 2 monitors @ 1920x1080
E220x Gigabit Ethernet 1000 Mbps
Storage: 13.01 TB
Intel 8 C220 HD Audio, full 5.1 Surround
User avatar
PaulL
Level 6
Level 6
Posts: 1070
Joined: Mon Apr 24, 2023 10:57 am
Location: Connecticut

Re: "ttf-mscorefonts-installer" Dependency Question

Post by PaulL »

Do you have access to the actual ttf files? If so, go into a terminal and change to /usr/share/fonts/truetype.

Then make a directory for the MS fonts and copy the fonts into it

Code: Select all

$ sudo mkdir <directoryname>
$ sudo mv <sourcefiles> <directoryname>
This may be easier in the file manager, because then you can have two window open and drag the files from one to another. In nemo I found I had to navigate to /usr/share, then right-click on fonts and choose "Open as root". From that point, it was easy.

After you have put the fonts in /usr/share/fonts, go to a terminal and type

Code: Select all

$ fc-cache -r
This causes all the font caches to be rebuilt. After that, your fonts should be available for use.

I should add that this is the necessary procedure to make the fonts available to all users. If you just want them available for your own use, all you need to do is to copy the ttf files into ~/.local/share/fonts and run fc-cache -r.

Whichever you do, the system won't find the fonts until you run fc-cache or reboot.
User avatar
Termy
Level 12
Level 12
Posts: 4248
Joined: Mon Sep 04, 2017 8:49 pm
Location: UK
Contact:

Re: "ttf-mscorefonts-installer" Dependency Question

Post by Termy »

EvilSupahFly wrote: Thu Jun 01, 2023 12:26 am I don't understand why they even need to depend on these other things, even on a pure Ubuntu install. Other font packages don't trigger these dependencies, so it doesn't make sense, especially given the availability of the same package, minus any dependencies, on Debian's upstream FTP server.
I agree, and I can appreciate the frustration.

Thinking about this more, it does seem really bizarre that some of those packages are required. It essentially looks like it's adding the dependencies for 'ubuntu-release-upgrader-core', which should have nothing at all to do with fonts, even if the package is fetching the fonts from the Internet in some non-standard way. I'm on an Ubuntu 18.04 base and it also attempts to install those on my system. Bit odd, for sure. Time to investigate.

I downloaded then extracted the 'ttf-mscorefonts-installer' package. The package itself primarily installs a POSIX shell script which handles the actual fetching and installation of the desired fonts. The fonts seem to be downloaded via the following list of URLs.
  • http://downloads.sourceforge.net/corefonts/andale32.exe
  • http://downloads.sourceforge.net/corefonts/arial32.exe
  • http://downloads.sourceforge.net/corefonts/arialb32.exe
  • http://downloads.sourceforge.net/corefonts/comic32.exe
  • http://downloads.sourceforge.net/corefonts/courie32.exe
  • http://downloads.sourceforge.net/corefonts/georgi32.exe
  • http://downloads.sourceforge.net/corefonts/impact32.exe
  • http://downloads.sourceforge.net/corefonts/times32.exe
  • http://downloads.sourceforge.net/corefonts/trebuc32.exe
  • http://downloads.sourceforge.net/corefonts/verdan32.exe
  • http://downloads.sourceforge.net/corefonts/webdin32.exe
From looking through the aforementioned script, I've found it has the following dependencies:
  • 'debconf'
  • 'gawk' (AKA: AWK)
  • 'coreutils'
  • 'cabextract'
  • 'gzip'
That's it. Nothing in this file appears to have anything to do with the packages in question. Elsewhere in the package, files for something called Lintian is used, found in the 'lintian' package, which is a tool that checks Debian packages, presumably to ensure the package meets Debian or Ubuntu packaging requirements; however, I don't believe this is a dependency, only that it supports being checked by Lintian.

From looking through the whole package, I see absolutely zero reason why 'ubuntu-release-upgrader-core' and associated packages are marked as a dependency. The control file does have 'update-notifier-common' marked as a dependency though, oddly. I don't recall seeing anything about a notification in the script, but perhaps I missed something. Either way, the 'update-notifier-common' package being marked as a dependency is what's bringing in the packages in question. It probably should be looked into.
I'm also Terminalforlife on GitHub.
User avatar
EvilSupahFly
Level 3
Level 3
Posts: 126
Joined: Sat May 24, 2014 11:10 am
Location: Mordor

Re: "ttf-mscorefonts-installer" Dependency Question

Post by EvilSupahFly »

PaulL wrote: Thu Jun 01, 2023 5:31 pm Do you have access to the actual ttf files? If so, go into a terminal and change to /usr/share/fonts/truetype.

Then make a directory for the MS fonts and copy the fonts into it

Code: Select all

$ sudo mkdir <directoryname>
$ sudo mv <sourcefiles> <directoryname>
This may be easier in the file manager, because then you can have two window open and drag the files from one to another. In nemo I found I had to navigate to /usr/share, then right-click on fonts and choose "Open as root". From that point, it was easy.

After you have put the fonts in /usr/share/fonts, go to a terminal and type

Code: Select all

$ fc-cache -r
This causes all the font caches to be rebuilt. After that, your fonts should be available for use.

I should add that this is the necessary procedure to make the fonts available to all users. If you just want them available for your own use, all you need to do is to copy the ttf files into ~/.local/share/fonts and run fc-cache -r.

Whichever you do, the system won't find the fonts until you run fc-cache or reboot.
I actually just used Debian's upstream package to install the fonts since it gave me what I wanted without the odd-ball dependencies Ubuntu is asking for.
Termy wrote: Thu Jun 01, 2023 6:12 pm
EvilSupahFly wrote: Thu Jun 01, 2023 12:26 am I don't understand why they even need to depend on these other things, even on a pure Ubuntu install. Other font packages don't trigger these dependencies, so it doesn't make sense, especially given the availability of the same package, minus any dependencies, on Debian's upstream FTP server.
I agree, and I can appreciate the frustration.

Thinking about this more, it does seem really bizarre that some of those packages are required. It essentially looks like it's adding the dependencies for 'ubuntu-release-upgrader-core', which should have nothing at all to do with fonts, even if the package is fetching the fonts from the Internet in some non-standard way. I'm on an Ubuntu 18.04 base and it also attempts to install those on my system. Bit odd, for sure. Time to investigate.

I downloaded then extracted the 'ttf-mscorefonts-installer' package. The package itself primarily installs a POSIX shell script which handles the actual fetching and installation of the desired fonts. The fonts seem to be downloaded via the following list of URLs.
From looking through the aforementioned script, I've found it has the following dependencies:
  • 'debconf'
  • 'gawk' (AKA: AWK)
  • 'coreutils'
  • 'cabextract'
  • 'gzip'
That's it. Nothing in this file appears to have anything to do with the packages in question. Elsewhere in the package, files for something called Lintian is used, found in the 'lintian' package, which is a tool that checks Debian packages, presumably to ensure the package meets Debian or Ubuntu packaging requirements; however, I don't believe this is a dependency, only that it supports being checked by Lintian.

From looking through the whole package, I see absolutely zero reason why 'ubuntu-release-upgrader-core' and associated packages are marked as a dependency. The control file does have 'update-notifier-common' marked as a dependency though, oddly. I don't recall seeing anything about a notification in the script, but perhaps I missed something. Either way, the 'update-notifier-common' package being marked as a dependency is what's bringing in the packages in question. It probably should be looked into.
In the next few days, when I have more time, I'm going to press my inquiry to Canonical, and see what they say. I'm relieved that someone else finds it strange too. :P
My Frankensteined Black Beast:
Intel Core i7-4770S CPU @ 3.10GHz × 8 x64
NVIDIA GeForce GTX 1660, 2 monitors @ 1920x1080
E220x Gigabit Ethernet 1000 Mbps
Storage: 13.01 TB
Intel 8 C220 HD Audio, full 5.1 Surround
User avatar
EvilSupahFly
Level 3
Level 3
Posts: 126
Joined: Sat May 24, 2014 11:10 am
Location: Mordor

Re: "ttf-mscorefonts-installer" Dependency Question

Post by EvilSupahFly »

So, according to https://git.launchpad.net/ubuntu/+sourc ... ?showmsg=1, Canonical Migrated "to an update-notifier hook, so that package data can be handled asynchronously and not cause install failures on network problems."

The answer I got from Ubuntu said "Downstream distros (like Mint) are welcome to roll their own packages and select their own patches."

Translation: if we don't want the extra packages installed on Mint, we need our own version of the package in the Mint repos.
My Frankensteined Black Beast:
Intel Core i7-4770S CPU @ 3.10GHz × 8 x64
NVIDIA GeForce GTX 1660, 2 monitors @ 1920x1080
E220x Gigabit Ethernet 1000 Mbps
Storage: 13.01 TB
Intel 8 C220 HD Audio, full 5.1 Surround
t42
Level 11
Level 11
Posts: 3744
Joined: Mon Jan 20, 2014 6:48 pm

Re: "ttf-mscorefonts-installer" Dependency Question

Post by t42 »

EvilSupahFly wrote: Fri Jun 02, 2023 7:57 pm So, according to https://git.launchpad.net/ubuntu/+sourc ... ?showmsg=1, Canonical Migrated "to an update-notifier hook, so that package data can be handled asynchronously and not cause install failures on network problems."
That's for Ubuntu 23.04, we need to wait until middle 2024 to get it into LM.
-=t42=-
User avatar
EvilSupahFly
Level 3
Level 3
Posts: 126
Joined: Sat May 24, 2014 11:10 am
Location: Mordor

Re: SOLVED: "ttf-mscorefonts-installer" Dependency Question

Post by EvilSupahFly »

t42 wrote: Sat Jun 03, 2023 2:21 am
EvilSupahFly wrote: Fri Jun 02, 2023 7:57 pm So, according to https://git.launchpad.net/ubuntu/+sourc ... ?showmsg=1, Canonical Migrated "to an update-notifier hook, so that package data can be handled asynchronously and not cause install failures on network problems."
That's for Ubuntu 23.04, we need to wait until middle 2024 to get it into LM.
So, in the meantime we either override APT or use Debian's upstream package if we need the Microsoft Core Fonts installed. Marking this SOLVED now.
My Frankensteined Black Beast:
Intel Core i7-4770S CPU @ 3.10GHz × 8 x64
NVIDIA GeForce GTX 1660, 2 monitors @ 1920x1080
E220x Gigabit Ethernet 1000 Mbps
Storage: 13.01 TB
Intel 8 C220 HD Audio, full 5.1 Surround
User avatar
Termy
Level 12
Level 12
Posts: 4248
Joined: Mon Sep 04, 2017 8:49 pm
Location: UK
Contact:

Re: "ttf-mscorefonts-installer" Dependency Question

Post by Termy »

EvilSupahFly wrote: Fri Jun 02, 2023 7:57 pm So, according to https://git.launchpad.net/ubuntu/+sourc ... ?showmsg=1, Canonical Migrated "to an update-notifier hook, so that package data can be handled asynchronously and not cause install failures on network problems."
I'm not keen on the explanation you were given, but it's certainly possible I'm missing a piece of the puzzle.

I'm thinking all the script needs to do is verify the downloads, bail and clean up after itself if anything failed, causing DPKG to take that as a failed package installation. I am assuming the script is executed during the installation phase. IIRC, the script uses Wget, which can report whether a connection could not be established (e.g., 404). Wget can report a prematurely closed connection as well, as long as --timeout N is used to prevent the user forever waiting. An MD5 check on the files could go a long way to suggest they downloaded correctly. Looking at the Debian package, it already handles it very well. I'm not sure why Canonical felt the need to change it, so I have to conclude I'm missing pieces of the puzzle. :roll:

At least there are ways around it.
I'm also Terminalforlife on GitHub.
User avatar
EvilSupahFly
Level 3
Level 3
Posts: 126
Joined: Sat May 24, 2014 11:10 am
Location: Mordor

Re: SOLVED: "ttf-mscorefonts-installer" Dependency Question

Post by EvilSupahFly »

Well, I had to persist. At first, they tried to blow me off saying downstream distributions aren't supported, until I pointed out it happened on your install of 18.04, and they said 18.04 was beyond the support window.

After that, someone else said that it still happens on 22.04, to which it was politely suggested that we refer to the changelog and release notes.

By this point, I just rolled my eyes, nodded, smiled, and thanked them for their time. Clearly, it was a change for the sake of change, not out of any urgency or necessity, but Canonical isn't going to admit it.

Like you said, we have workarounds, and it's not a perfect solution, but they're good enough to implement without breaking anything.

¯⁠\⁠(⁠°⁠_⁠o⁠)⁠/⁠¯

** Edit ** - In a new update on my Ubuntu thread, someone says, "The rationale behind the update-notifier-common dependency is stated at bug #876298."

Following that, we are informed thusly (about Flash initially, but linked is the ms-ttf package I was complaining about):
At the 11.10 release archive.canonical.com collapsed under heavy load and started returning 503 errors. This caused the flash package to be unable to grab its payload and thus caused the package to fail, which in turn caused the installation to fail.

The current plan is to add metadata to a package where it can add a URL to retrieve its data, so ubiquity and apt-get --download-only can cache it. We also need a way to queue up package installation post-install, for when we commit to installing flash but cannot do so due to network issues, or when the user wishes to have full language support post-install.

This change requires a freeze exception for precise, as it involves adding new features to update-notifier and significant reworking of the maintainer scripts for the affected packages. It also introduces new UI components; however these UI components are only visible in the event of a failure, so I don't think we should block on UI freeze for making this change given the significant benefit to the install experience when a download fails.
That being said, this information doesn't change anything about how we work around these dependencies.
My Frankensteined Black Beast:
Intel Core i7-4770S CPU @ 3.10GHz × 8 x64
NVIDIA GeForce GTX 1660, 2 monitors @ 1920x1080
E220x Gigabit Ethernet 1000 Mbps
Storage: 13.01 TB
Intel 8 C220 HD Audio, full 5.1 Surround
User avatar
Termy
Level 12
Level 12
Posts: 4248
Joined: Mon Sep 04, 2017 8:49 pm
Location: UK
Contact:

Re: SOLVED: "ttf-mscorefonts-installer" Dependency Question

Post by Termy »

EvilSupahFly wrote: Sat Jun 03, 2023 4:56 pm [...]
Nice one. According to Canonical themselves, 18.04 is end of life in 2028. I don't even have the extended support thing and I'm still getting updates, not that I'm complaining. Thus, them dismissing your point that it behaves the same on an Ubuntu system strikes me as them simply moving the goalpost. This seems to be confirmed after they moved the goalpost again when you mentioned a newer release.

I'll have to just take that excerpt's word for it, because it seems so far out of context that I don't really understand what it's on about. At least in the packages I looked at, if the files are downloaded from SourceForge and not Canonical's servers, I'm not sure how that would affect Canonical's servers. It seems like the justification for these packages being required are because of another package of a similar nature somehow messed things up in around 2017. Perhaps they added these dependencies as a 'just in-case' rule, because of that thing that once happened, hence them being unable to clearly justify these dependencies. Gotta conclude I'm missing puzzle pieces, again.

I'm so glad I have no interest in Microsoft fonts, because this package now bugs me. I think it's best to just leave it as it is, thankful in the knowledge that y'all have alternative solutions. This was a 'fun' adventure, though. :lol: I'm quite tempted to rebuild the package without those dependencies, then watch it successfully download the fonts. Admittedly, I did already do part of it, but I didn't feel comfortable accepting that agreement. :roll:
I'm also Terminalforlife on GitHub.
User avatar
EvilSupahFly
Level 3
Level 3
Posts: 126
Joined: Sat May 24, 2014 11:10 am
Location: Mordor

Re: SOLVED: "ttf-mscorefonts-installer" Dependency Question

Post by EvilSupahFly »

LATE STAGE UPDATE:

I've cited this issue and another one as examples in my official complaint over at https://github.com/orgs/linuxmint/discussions/108 if anybody was curious.
My Frankensteined Black Beast:
Intel Core i7-4770S CPU @ 3.10GHz × 8 x64
NVIDIA GeForce GTX 1660, 2 monitors @ 1920x1080
E220x Gigabit Ethernet 1000 Mbps
Storage: 13.01 TB
Intel 8 C220 HD Audio, full 5.1 Surround
Locked

Return to “Software & Applications”