Prevent installation of dependency package

Recently I started using shells/starship but it pulls in x11-fonts/nerd-fonts as a default dependency, which clocks in at 2 GB. This is entirely useless data for me and on systems with a smaller footprint it can be as much as >= 10% of the whole disk capacity. I have already written to the maintainer and asked if changing the default is an option.

In the meantime, I'd like to know if there is any way to prevent pkg from installing said package, since every time I try to force remove it, it only takes another update of any software to have it installed again.

I'd like to avoid using a whole Poudriere setup just to avoid Nerd Fonts getting installed.
 
Build from ports and turn off FONTS.

Code:
FONTS=on: Install fonts

I'd like to know if there is any way to prevent pkg from installing said package
Simple answer, no, there isn't. Dependencies of packages are "set in stone", they cannot be changed (or removed) once the package has been created. The only way is to build your own package from ports, thus creating your own package that doesn't have this dependency.
 
Dependencies of packages are "set in stone"
Actually they're set in the +MANIFEST (and also in +COMPACT_MANIFEST) file inside the .txz archive, so you COULD change them if you really want. But I'd strongly recommend not to try this, it will be a maintenance nightmare.

But if I understand the situation correctly, it looks questionable whether this port option should be enabled by default. After all, you wouldn't lose anything when adding this font package manually? So, maybe file a PR about that, suggesting this change (should be a one-line modification in the port's Makefile).
 
Actually they're set in the +MANIFEST (and also in +COMPACT_MANIFEST) file inside the .txz archive, so you COULD change them if you really want.
Which is going to get overwritten if the package gets updated and you're back to square one. You could use pkg delete -f, that shouldn't delete the depending package but same result, first update of the package will pull in the dependency again.
 
SirDice, I assume pkg delete -f would be even worse cause any upgrade would attempt to "fix" this. But then, always modifying a specific package before installing it *is* an example for a maintenance nightmare, right?

Still, I have doubts it's wise to have an option adding a huge font package set as default in a port.
 
Thanks all for the suggestions and comments. I figured as much but thought I'd ask if I possibly overlooked something. It makes sense that it works this way.

Fortunately the maintainer reacted very quickly and viewed this as an oversight that was already corrected.
 
Back
Top