Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 666635 - font eclass is broken for EAPI=7 (e.g. use of ${EROOT} with assumption of trailing slash)
Summary: font eclass is broken for EAPI=7 (e.g. use of ${EROOT} with assumption of tra...
Status: IN_PROGRESS
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:
Depends on:
Blocks:
 
Reported: 2018-09-20 16:14 UTC by Sebastian Pipping
Modified: 2018-09-20 16:51 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Pipping gentoo-dev 2018-09-20 16:14:42 UTC
The font eclass does not support EAPI 7 (e.g. trailing slash assumed with EROOT) but does not do anything to protect against its use with it.

Use of EROOT:

  # fgrep EROOT /usr/portage/eclass/font.eclass 
        find -L "${EROOT}"usr/share/fonts/ -type d -print0 | while read -d $'\0' d; do
                                EROOT=${ROOT}
                                [[ ${EROOT} = */ ]] || EROOT+="/"
        [[ -e "${EROOT}/${FONTDIR}/fonts.cache-1" ]] && rm -f "${EROOT}/${FONTDIR}/fonts.cache-1"
        find "${EROOT}"usr/share/fonts/ -type f '!' -perm 0644 -print0 \
                        if [[ -e ${EROOT}etc/fonts/conf.avail/$(basename ${conffile}) ]]; then
        find "${EROOT}"usr/share/fonts/ -type f '!' -perm 0644 -print0 \


Symptom in action:
  $ ebuild x11fonts-jmk-3.0-r2.ebuild clean merge clean
  [..]
  --- replaced dir /usr
   * Cleaning up font directories ...
  find: ‘usr/share/fonts/’: No such file or directory                                                                                                              [ ok ]
  find: ‘usr/share/fonts/’: No such file or directory
   * Skipping fontcache update (media-libs/fontconfig is not installed or ROOT != /)
  >>> Original instance of package unmerged safely.
  find: ‘usr/share/fonts/’: No such file or directory
   * Skipping fontcache update (media-libs/fontconfig is not installed or ROOT != /)
  >>> media-fonts/x11fonts-jmk-3.0-r2 merged.

I suggest to raise severity to critical.  I'll downgrade x11fonts-jmk to EAPI 6 in a second.
Comment 1 Larry the Git Cow gentoo-dev 2018-09-20 16:20:32 UTC
The bug has been referenced in the following commit(s):

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

commit ef732a3e07bdb25bd43610672dc5728930065868
Author:     Sebastian Pipping <sping@gentoo.org>
AuthorDate: 2018-09-20 16:19:27 +0000
Commit:     Sebastian Pipping <sping@gentoo.org>
CommitDate: 2018-09-20 16:19:27 +0000

    media-fonts/x11fonts-jmk: Downgrade EAPI 7 to 6
    
    font.eclass broken for EAPI 7
    Bug: https://bugs.gentoo.org/666635
    Package-Manager: Portage-2.3.49, Repoman-2.3.10

 .../{x11fonts-jmk-3.0-r2.ebuild => x11fonts-jmk-3.0-r3.ebuild}          | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 3 Larry the Git Cow gentoo-dev 2018-09-20 16:43:39 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=545e630fcc3baa42202ea9ff303a3d2c6dfc8b80

commit 545e630fcc3baa42202ea9ff303a3d2c6dfc8b80
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: 2018-09-20 16:42:01 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: 2018-09-20 16:43:23 +0000

    media-fonts/bitstream-cyberbit: Back to EAPI=6, bug 666635
    
    Bug: https://bugs.gentoo.org/666635
    Package-Manager: Portage-2.3.49, Repoman-2.3.10
    RepoMan-Options: --force

 .../bitstream-cyberbit-2.0-r1.ebuild               | 22 ----------------------
 ...2.0.ebuild => bitstream-cyberbit-2.0-r2.ebuild} |  0
 2 files changed, 22 deletions(-)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1bc581457b2bb5e6444294da4d8951eb8b31449e

commit 1bc581457b2bb5e6444294da4d8951eb8b31449e
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: 2018-09-20 16:39:21 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: 2018-09-20 16:43:23 +0000

    media-fonts/symbola: Downgrade to EAPI=6, bug 666635
    
    Bug: https://bugs.gentoo.org/666635
    Package-Manager: Portage-2.3.49, Repoman-2.3.10

 media-fonts/symbola/{symbola-11.00.ebuild => symbola-11.00-r1.ebuild} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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

commit fc351c8366eb82fbc55d068d4296a9723c844ca6
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: 2018-09-20 16:37:33 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: 2018-09-20 16:43:22 +0000

    font.eclass: Add EAPI guardian block, bug 666635
    
    Bug: https://bugs.gentoo.org/666635

 eclass/font.eclass | 5 +++++
 1 file changed, 5 insertions(+)
Comment 4 Andreas K. Hüttel archtester gentoo-dev 2018-09-20 16:44:56 UTC
Added a guard block and downgraded the two existing ebuilds. Now it's not critical anymore...
Comment 5 Sebastian Pipping gentoo-dev 2018-09-20 16:51:04 UTC
(In reply to Andreas K. Hüttel from comment #4)
> Added a guard block and downgraded the two existing ebuilds. Now it's not
> critical anymore...

Thumbs up!