Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 566402 - sci-biology/foldingathome: references PORTDIR in pkg_setup() where it is a PMS violation
Summary: sci-biology/foldingathome: references PORTDIR in pkg_setup() where it is a PM...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Ian Stakenvicius (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 373349
  Show dependency tree
 
Reported: 2015-11-21 17:48 UTC by Michał Górny
Modified: 2017-04-21 15:19 UTC (History)
5 users (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 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-11-21 17:48:47 UTC
pkg_setup() {                                                                    
    I="${EROOT}/${I}"                                                            
    einfo ""                                                                     
    cat "${PORTDIR}"/licenses/FAH-special-permission                             
    einfo ""                                                                     
}

Afraid that's invalid since PORTDIR is valid only in src_* phases. And anyway, would be nice to get rid of it since it blocks killing of PORTDIR.

@licenses, I recall some recent discussion about special permissions. Does it really belong in licenses/?
Comment 1 Ian Stakenvicius (RETIRED) gentoo-dev 2015-11-21 21:15:08 UTC
The "license" does need to be displayed.  However, this cat "${PORTDIR}" line is really just there as a convenience; I can just reproduce it in pkg_setup and ensure it's kept in sync with the file in licenses/ instead.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-11-21 21:46:10 UTC
I know that it needs to be displayed. However, I'm wondering if it needs to go into LICENSE as well -- but I guess it's better that way for consistency.

As for displaying it, either inline it or move it to one of src_* phases. I'd personally prefer the former to reduce uses of PORTDIR. However, EAPI 7 may introduce LICENSEDIR for this, depending on the results of the discussion I just requested.
Comment 3 Ian Stakenvicius (RETIRED) gentoo-dev 2017-04-21 15:19:29 UTC
commit 0b358efe8ef86e9410477fd9f4d298ef97737944
Author: Ian Stakenvicius <axs@gentoo.org>
Date:   Fri Apr 21 10:53:55 2017 -0400

    sci-biology/foldingathome: fix use of $PORTDIR in phase function
    
    Bug: http://bugs.gentoo.org/566402