Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 579626 - sys-apps/portage: EAPI=6 empty PATCHES array fails to work
Summary: sys-apps/portage: EAPI=6 empty PATCHES array fails to work
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Ebuild Support (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: Bug, InVCS
Depends on:
Blocks: portage-2.3.0
  Show dependency tree
 
Reported: 2016-04-11 15:03 UTC by Matthew Thode ( prometheanfire )
Modified: 2017-03-16 23:07 UTC (History)
2 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 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2016-04-11 15:03:15 UTC
Not sure if this is limited to also using distutils-r1 or not but all you should have to do is have this in your ebuild to reproduce

'
PATCHES=(

)
Comment 1 Zac Medico gentoo-dev 2016-04-20 18:45:50 UTC
The spec says the default src_prepare should look like this:

src_prepare() {  
    if declare -p PATCHES | grep -q "^declare -a "; then  
        [[ -n ${PATCHES[@]} ]] && eapply "${PATCHES[@]}"  
    else  
        [[ -n ${PATCHES} ]] && eapply ${PATCHES}  
    fi  
    eapply_user  
}

Here's what we currently have:

__eapi6_src_prepare() {
	if [[ $(declare -p PATCHES 2>/dev/null) == "declare -a"* ]]; then
		eapply "${PATCHES[@]}"
	elif [[ -n ${PATCHES} ]]; then
		eapply ${PATCHES}
	fi

	eapply_user
}
Comment 2 Zac Medico gentoo-dev 2016-04-20 19:01:01 UTC
There's a patch in the following branch:

https://github.com/zmedico/portage/tree/bug_579626

I've posted it for review here:

https://archives.gentoo.org/gentoo-portage-dev/message/f2efa8da238b727c478fb06910bbd8fd
Comment 4 Zac Medico gentoo-dev 2017-03-16 23:07:59 UTC
Fixed in portage-2.3.0.