File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Documentation/maintainers/new Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,8 @@ bump_packages_from_set() {
3737 ekeyword ^all ${destination} > /dev/null
3838
3939 if [[ ${destination} != * 9999* ]] ; then
40- ekeyword $( get_main_tree_keyword ${cp} ) ${destination} > /dev/null
40+ local slot=" $( portageq metadata / ebuild ${cp} -${sourceversion} SLOT) "
41+ ekeyword $( get_main_tree_keyword ${cp} ${slot%/* } ) ${destination} > /dev/null
4142 ekeyword ~ all ${destination} > /dev/null
4243 fi
4344
@@ -145,14 +146,20 @@ create_keywords_files() {
145146}
146147
147148# @FUNCTION: get_main_tree_keyword
148- # @USAGE: <cp>
149+ # @USAGE: <cp> [slot]
149150# @DESCRIPTION:
150151# Given a <cp>, get the keywords from the highest ebuild version in the gentoo repo.
151152get_main_tree_keyword () {
152153 local portdir=" $( portageq get_repo_path / gentoo) "
153154 local cp=" ${1} "
155+ local slot basever
154156
155- echo $( sed -ne ' s/^\s*KEYWORDS="\(.*\)"/\1/p' " $( ls ${portdir} /${cp} /* .ebuild | sort | tail -n 1) " )
157+ if [[ -n ${2} ]]; then
158+ slot=" :${2} "
159+ fi
160+ slot=" ${slot} ::gentoo"
161+ basever=" $( portageq best_visible / ${cp}${slot} ) " # TODO: what if there is no such slot in tree?
162+ echo $( portageq metadata / ebuild ${basever} KEYWORDS)
156163}
157164
158165# @FUNCTION: get_package_list_from_set
You can’t perform that action at this time.
0 commit comments