FS#62761 - [lsd] Move any and all font dependencies of lsd to optional deps
Attached to Project:
Community Packages
Opened by Andy (andydecleyre) - Tuesday, 28 May 2019, 06:01 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:00 GMT
Opened by Andy (andydecleyre) - Tuesday, 28 May 2019, 06:01 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:00 GMT
|
Details
The lsd package has a hard dependency on
awesome-terminal-fonts, but other fonts can fulfill the
need. On my system, I have much better icon support in lsd
with ttf-nerd-fonts-symbols (as in the AUR) than with those
provided by awesome-terminal-fonts.
awesome-terminal-fonts should be an optional dependency (after all, lsd has a 'unicode' theme as well). If other suitable font packages such as ttf-nerd-fonts-symbols make it into the community repository in the future, they can also be added as optional dependencies right along side. Additional info: * 0.14.0-1 |
This task depends upon
Closed by Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:00 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/p ackaging/packages/lsd/issues/1
Saturday, 25 November 2023, 20:00 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/p ackaging/packages/lsd/issues/1
Well, that depends on the user's installed fonts, which may or may not come from the official repos, or third party repos, or the AUR, or non-repo sources. The AUR has >30 "nerd-fonts" packages available, and some folks also patch their chosen fonts manually.
And as far as I can tell, even using the currently required font dependencies, output is broken for at least these filetypes:
zip,
epub,
json,
txt,
conf,
js,
md,
sh,
css,
yml
That was using the following block in my user's fonts.conf:
<match target="pattern">
<test qual="any" name="family"><string>monospace</string></test>
<edit name="family" mode="assign" binding="same"><string>Iosevka Custom</string></edit>
<edit name="family" mode="append" binding="weak"><string>EmojiOne</string></edit>
<edit name="family" mode="append" binding="weak"><string>Pomodoro</string></edit>
<edit name="family" mode="append" binding="weak"><string>FontAwesome</string></edit>
<edit name="family" mode="append" binding="weak"><string>octicons</string></edit>
<edit name="family" mode="append" binding="weak"><string>icomoon</string></edit>
</match>
Whereas the following block results in a complete, non-broken output (as far as I can tell):
<match target="pattern">
<test qual="any" name="family"><string>monospace</string></test>
<edit name="family" mode="assign" binding="same"><string>Iosevka Custom</string></edit>
<edit name="family" mode="append" binding="weak"><string>EmojiOne</string></edit>
<edit name="family" mode="append" binding="weak"><string>Symbols Nerd Font</string></edit>
</match>
So as it is, I think we have broken output by default with or without that hard requirement on the system. Ideally a more complete font of icons will make it into the community repo, so it can be added as an optional dep.
EDIT: And if the user uses the 'unicode' theme for lsd, the number of fonts which satisfy the requirements goes way up.
what is the concern? its a couple of kilobytes to install. you are still free to install and use whatever font you like
So you figured the solution was to re-upload it?
> Does that mean someone has decided to correct the dependencies on this package, or that someone wants to ensure a package with accurate dependencies is not made available to users, even via the user repo?
No, the two actions were totally unrelated. The AUR package you created was deleted as a duplicate of community/lsd on the grounds that "fixing" the dependencies is not sufficient rationale for creating a new package. Therefore, do not reupload it. Do not do so again.
On an unrelated note, you believe the dependencies for the repository package are incorrect. If that is true, then the repository package should be fixed. But so far, you have not convinced the maintainer that they are in fact incorrect, and even if they were, it is unclear why a 400KB package that you personally don't need, is problematic to have as an extraneous package (for the sake of making the package actually work out of the box).
Currently from a repo perspective this seems to be just for the sake of not having a 400kb font, but i can tell you you have more than just a handful of dependencies included in other packages (as we tend to enable lot of features if available) that you will never even use. At the end, this is not gentoo. So Either at one point a good abstract comes up for meta provides of glyph fonts that fonts can adopt or you will need to either provide a local build on your disc that has one dependency less or switch to gentoo with use flags.
Five months ago, it was removed by force. No one asked me to remove it, no one volunteered an explanation, and no one offered one here in response to my request for one.
The information available to me was that this issue was marked as assigned, and kept open. So I figured the intent was to fix the bug. After waiting those five months, I figured no one cared to follow through, so I'd offer my solution to the community again until anyone did care to follow through. I didn't think it was a solution, just a temporary help while waiting for a solution.
> Therefore, do not reupload it. Do not do so again.
OK. Please note this is the very first time anyone has communicated to me about that package.
I apologize for offending everybody.
extra/fontconfig
extra/freetype2
extra/graphite
extra/harfbuzz
extra/libpng
Since I'm using it exclusively through ssh, that's a bit unnecessary. pacman's --assume-installed helped me in that case but I believe that a soft dep would be better. Please reconsider.
Thanks!
Link: https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/awesome-terminal-fonts
[1] https://www.archlinux.org/packages/community/x86_64/ttf-nerd-fonts-symbols/
Note that the initial bug report indicated a user preference for exactly ttf-nerd-fonts-symbols, but other people concerned by the fontconfig dependency won't be able to satisfy that due to ttf-nerd-fonts-symbols also having the strange dependency on fontconfig.
1. The default font dependency awesome-terminal-fonts is outdated, upstream looks dead.
There were no updates to the awesome-terminal-fonts projects since almost three years and the font is missing symbols, for example for shell and perl scripts. On the other hand, there is now a package in the repositories, ttf-nerd-fonts-symbols, that provides these symbols and can actually completely replace the old awesome-terminal-fonts package. Replacing the font dependency would therefore improve the lsd output compared to the current situation.
It would be possible to use a virtual package instead, but I do not see the need since there is only one package in the repositories (after dropping awesome-terminal-fonts) that could provide it and I am not sure if all glphy fonts are compatible. I think lsd specifically needs font-awesome.
I would suggest to make lsd depend on ttf-nerd-fonts-symbols instead of awesome-terminal-fonts and the awesome-terminal-fonts package can be dropped as soon as the optional dependencies of the powerlevel packages were updated as well. Should I create a new report for this?
2. The font dependency should be optional, because lsd can be used without a glyph font on headless systems.
Since lsd does not fall back to the unicode icon theme if no glyph font is installed, making the font dependency optional would lead to a worse experience for the default user, probably leading to many reports of broken lsd output.
In my opinion, making the font dependency optional is not a good solution. Instead, the following issue should be fixed:
3. Several font packages depend on fontconfig which is not necessary anymore.
According to the font packaging guidelines, the dependency on fontconfig only exists for historic reasons:
https://wiki.archlinux.org/index.php/Font_packaging_guidelines#Dependencies
> Dependencies
>
> Fonts do not depend on anything. Many packages in the repositories, however,
> include fontconfig and xorg-mkfontscale as dependecies. Those were required
> when font packages needed to use install scripts to update the font cache – a
> lot of duplicate work now done by pacman hooks. If you install fontconfig or
> xorg-mkfontscale, all existing fonts in /usr/share/fonts/ will be cached making
> it unnecessary to force people to use fontconfig or mkfontscale.
So the obvious solution would be to create a TODO list to drop this dependency (and xorg-mkfontscale) from all font packages. As soon as this is implemented, it will be possible to install fonts (and also lsd) without the fontconfig dependency.
FS#66012, awesome-terminal-fonts will probably follow soon. The fontconfig dependency issue raised in this report should not be an impediment anymore.[1] https://git.archlinux.org/svntogit/community.git/commit/trunk?h=packages/ttf-nerd-fonts-symbols&id=e24dd0e438b19758949db98718d010fdd178e015
Installing lsd without awesome-terminal-fonts provides broken output for me.
Only installing a nerd-patched font gives me unbroken output.
Installing awesome-terminal-fonts will only work if your terminal automatically falls back to other system fonts.
Many terminals ONLY use a single font: the one configured, and no other. Having a second font sitting there installed affects nothing.
OTOH, I've noticed that when installing awesome-terminal-fonts, other apps seems to break -- it would seem that this font has precedence over other fonts whenever fontconfig does its fallback magic. Uninstalling awesome-terminal-fonts fixed it for me.
In other words: `lsd` won't work necessarily work because of the presence of awesome-terminal-fonts, and may work without it.
Upstream is also pretty clear in the instructions: they require a patched font. So it seems that these results align with upstream's expectations.
Given that upstream recommends either font-awesome or nerd-fonts, can `optdepends` be changed set `nerd-fonts` and `awesome-terminal-fonts` to reflect this, and the latter be removed from `depends`?