Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 754702 - font.eclass: postrm phase failed: find: ‘/usr/share/fonts/’: No such file or directory
Summary: font.eclass: postrm phase failed: find: ‘/usr/share/fonts/’: No such file or ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Fonts Team
URL:
Whiteboard:
Keywords:
: 867028 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-11-15 09:58 UTC by Alexey
Modified: 2022-10-19 03:09 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (file_754702.txt,15.09 KB, text/plain)
2020-11-15 09:58 UTC, Alexey
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey 2020-11-15 09:58:40 UTC
Created attachment 671509 [details]
emerge --info

This is a headless system, and I did `emerge -c` for the first time after unpacking stage3.

So, this is expected:

$ ls /usr/share/fonts
ls: cannot access '/usr/share/fonts': No such file or directory

But this is not:

No package files given... Grabbing a set.
<<<          obj /usr/share/fonts/liberation-fonts/LiberationSerif-Regular.ttf
<<<          obj /usr/share/fonts/liberation-fonts/LiberationSerif-Italic.ttf
<<<          obj /usr/share/fonts/liberation-fonts/LiberationSerif-BoldItalic.ttf
<<<          obj /usr/share/fonts/liberation-fonts/LiberationSerif-Bold.ttf
<<<          obj /usr/share/fonts/liberation-fonts/LiberationSans-Regular.ttf
<<<          obj /usr/share/fonts/liberation-fonts/LiberationSans-Italic.ttf
<<<          obj /usr/share/fonts/liberation-fonts/LiberationSans-BoldItalic.ttf
<<<          obj /usr/share/fonts/liberation-fonts/LiberationSans-Bold.ttf
<<<          obj /usr/share/fonts/liberation-fonts/LiberationMono-Regular.ttf
<<<          obj /usr/share/fonts/liberation-fonts/LiberationMono-Italic.ttf
<<<          obj /usr/share/fonts/liberation-fonts/LiberationMono-BoldItalic.ttf
<<<          obj /usr/share/fonts/liberation-fonts/LiberationMono-Bold.ttf
<<<          obj /etc/fonts/conf.avail/60-liberation.conf
<<<          dir /usr/share/fonts/liberation-fonts
<<<          dir /usr/share/fonts
--- !empty   dir /usr/share
--- !empty   dir /usr
<<<          dir /etc/fonts/conf.avail
<<<          dir /etc/fonts
--- !empty   dir /etc
 * Cleaning up font directories ...
find: ‘/usr/share/fonts/’: No such file or directory
 [ ok ]
 * ERROR: media-fonts/liberation-fonts-2.1.0::gentoo failed (postrm phase):
 *   failed to fix font files perms
 * 
 * Call stack:
 *     ebuild.sh, line  125:  Called pkg_postrm
 *   environment, line 1656:  Called font_pkg_postrm
 *   environment, line 1004:  Called _update_fontcache
 *   environment, line  756:  Called die
 * The specific snippet of code:
 *       find "${EROOT%/}"/usr/share/fonts/ -type f '!' -perm 0644 -exec chmod -v 0644 {} + 2> /dev/null || die "failed to fix font files perms";
 * 
 * If you need support, post the output of `emerge --info '=media-fonts/liberation-fonts-2.1.0::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=media-fonts/liberation-fonts-2.1.0::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/._unmerge_/media-fonts/liberation-fonts-2.1.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/._unmerge_/media-fonts/liberation-fonts-2.1.0/temp/environment'.
 * Working directory: '/var/tmp/portage/._unmerge_/media-fonts/liberation-fonts-2.1.0/homedir'
 * S: '/var/tmp/portage/._unmerge_/media-fonts/liberation-fonts-2.1.0/work/liberation-fonts-2.1.0'
!!! FAILED postrm: 1
 * The 'postrm' phase of the 'media-fonts/liberation-fonts-2.1.0' package
 * has failed with exit value 1.
 * 
 * The problem occurred while executing the ebuild file named 'liberation-
 * fonts-2.1.0.ebuild' located in the '/var/db/pkg/media-fonts/liberation-
 * fonts-2.1.0' directory. If necessary, manually remove the
 * environment.bz2 file and/or the ebuild file located in that directory.
 * 
 * Removal of the environment.bz2 file is preferred since it may allow the
 * removal phases to execute successfully. The ebuild will be sourced and
 * the eclasses from the current ebuild repository will be used when
 * necessary. Removal of the ebuild file will cause the pkg_prerm() and
 * pkg_postrm() removal phases to be skipped entirely.

Perhaps /usr/share/fonts is missing .keep ? Another question is why it said 'ok' after the error?

$ emerge -pqv '=media-fonts/liberation-fonts-2.1.0::gentoo'
[ebuild  N    ] media-fonts/liberation-fonts-2.1.0  USE="-X -fontforge"
Comment 1 Pacho Ramos gentoo-dev 2020-12-21 09:47:05 UTC
This is from font.eclass
Comment 2 William Hubbs gentoo-dev 2022-08-21 18:05:07 UTC
I just got bit by this, what is the status?

Thanks,

William
Comment 3 Ionen Wolkens gentoo-dev 2022-08-27 23:07:30 UTC
*** Bug 867028 has been marked as a duplicate of this bug. ***
Comment 4 Larry the Git Cow gentoo-dev 2022-10-19 03:08:58 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9480cc629e2f98caf0bdf410724a294377e07f57

commit 9480cc629e2f98caf0bdf410724a294377e07f57
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-10-19 03:08:48 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-10-19 03:08:48 +0000

    font.eclass: check for dir existence in _update_fontcache
    
    It's still subject to a narrow race but nowhere near as bad as removed-last-font-now-
    its-gone.
    
    Closes: https://bugs.gentoo.org/754702
    Signed-off-by: Sam James <sam@gentoo.org>

 eclass/font.eclass | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-10-19 03:09:30 UTC
I've gone ahead with the obvious fix given I keep hitting this during arch testing.