Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 709578 - font.eclass: Missing die statements after pushd/popd in font_src_install
Summary: font.eclass: Missing die statements after pushd/popd in font_src_install
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:
Depends on:
Blocks:
 
Reported: 2020-02-14 07:21 UTC by Ulrich Müller
Modified: 2020-03-20 15:49 UTC (History)
1 user (show)

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 Ulrich Müller gentoo-dev 2020-02-14 07:21:00 UTC
When emerging media-fonts/open-sans, I get the following error messages:

>>> Install media-fonts/open-sans-1-r1 into /tmp/portage/media-fonts/open-sans-1-r1/image/
/tmp/portage/media-fonts/open-sans-1-r1/temp/environment: line 1036: pushd: /tmp/portage/media-fonts/open-sans-1-r1/work/open-sans-1: No such file or directory
* Creating fonts.scale & fonts.dir in open-sans
/tmp/portage/media-fonts/open-sans-1-r1/temp/environment: line 1043: popd: directory stack empty

These errors are not caught, because both pushd and popd miss a die statement.
Comment 1 Larry the Git Cow gentoo-dev 2020-03-20 15:49:20 UTC
The bug has been closed via the following commit(s):

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

commit 58cea2803d7aa7b1a98f72aa55b6221618dc5e5f
Author:     Ulrich Müller <ulm@gentoo.org>
AuthorDate: 2020-02-14 14:50:18 +0000
Commit:     Ulrich Müller <ulm@gentoo.org>
CommitDate: 2020-03-20 15:40:25 +0000

    font.eclass: Don't assign FONT_S in global scope, allow an array.
    
    Accessing ${S} in global scope is not allowed by PMS, therefore remove
    the global variable assignment of FONT_S which uses it. Add a fallback
    to ${S} in font_src_install() instead.
    
    Allow FONT_S to be an array, if there are multiple directories.
    Support for whitespace-separated lists will be kept for some time,
    and a QA warning will be shown.
    
    Die if pushd or popd fails.
    
    Closes: https://bugs.gentoo.org/613108
    Closes: https://bugs.gentoo.org/709578
    Signed-off-by: Ulrich Müller <ulm@gentoo.org>

 eclass/font.eclass | 36 ++++++++++++++++++++++++------------
 1 file changed, 24 insertions(+), 12 deletions(-)