Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 542822 Details for
Bug 657926
kernel-2.eclass: Migrate patching from src_unpack to src_prepare ebuild phase, deprecate EAPI<4 support
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Move patch logic
kernel-2.eclass_bug657926.diff (text/plain), 4.20 KB, created by
Thomas Deutschmann (RETIRED)
on 2018-08-09 00:41:30 UTC
(
hide
)
Description:
Move patch logic
Filename:
MIME Type:
Creator:
Thomas Deutschmann (RETIRED)
Created:
2018-08-09 00:41:30 UTC
Size:
4.20 KB
patch
obsolete
>diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass >index 0345061631..86ecea923e 100644 >--- a/eclass/kernel-2.eclass >+++ b/eclass/kernel-2.eclass >@@ -1453,42 +1453,76 @@ headers___fix() { > # @FUNCTION: kernel-2_src_unpack > # @USAGE: > # @DESCRIPTION: >-# unpack sources, handle genpatches, deblob >+# unpack sources > > kernel-2_src_unpack() { > universal_unpack >+ >+ # Setup xmakeopts and cd into sourcetree. >+ env_setup_xmakeopts >+ cd "${S}" >+ >+ # We dont need a version.h for anything other than headers >+ # at least, I should hope we don't. If this causes problems >+ # take out the if/fi block and inform me please. >+ # unpack_2_6 should now be 2.6.17 safe anyways >+ if [[ ${ETYPE} == headers ]]; then >+ debug-print "Doing headers" >+ kernel_is 2 4 && unpack_2_4 >+ kernel_is 2 6 && unpack_2_6 >+ fi >+} >+ >+# @FUNCTION: kernel-2_src_prepare >+# @USAGE: >+# @DESCRIPTION: >+# handle genpatches and user patches, deblob >+ >+kernel-2_src_prepare() { > debug-print "Doing unipatch" > >+ # Setup xmakeopts and cd into sourcetree. >+ env_setup_xmakeopts >+ pushd "${S}" >/dev/null || die >+ > # request UNIPATCH_LIST_GENPATCHES in phase since it calls 'use' > handle_genpatches --set-unipatch-list > [[ -n ${UNIPATCH_LIST} || -n ${UNIPATCH_LIST_DEFAULT} || -n ${UNIPATCH_LIST_GENPATCHES} ]] && \ > unipatch "${UNIPATCH_LIST_DEFAULT} ${UNIPATCH_LIST_GENPATCHES} ${UNIPATCH_LIST}" > >- debug-print "Doing premake" >+ # apply any user patches >+ debug-print "Applying any user patches" > >- # allow ebuilds to massage the source tree after patching but before >- # we run misc `make` functions below >- [[ $(type -t kernel-2_hook_premake) == "function" ]] && kernel-2_hook_premake >+ # Reset path which was changed for unipatch so that user patches >+ # don't need a special offset >+ popd >/dev/null || die > >- debug-print "Doing unpack_set_extraversion" >+ case ${EAPI:-0} in >+ 0|1|2|3|4|5) epatch_user ;; >+ 6) eapply_user ;; >+ esac > >- [[ -z ${K_NOSETEXTRAVERSION} ]] && unpack_set_extraversion >- unpack_fix_install_path >+ # Back to $S -- not sure if really needed but this was the original >+ # working directory before we moved code from _src_unpack to _src_prepare >+ # so restore path to ensure that we don't break previous code >+ pushd "${S}" >/dev/null || die > >- # Setup xmakeopts and cd into sourcetree. >- env_setup_xmakeopts >- cd "${S}" >+ # allow ebuilds to massage the source tree after patching but before >+ # we run misc `make` functions below >+ if [[ $(type -t kernel-2_hook_premake) == "function" ]]; then >+ debug-print "Doing kernel-2_hook_premake" >+ kernel-2_hook_premake >+ fi > >- # We dont need a version.h for anything other than headers >- # at least, I should hope we dont. If this causes problems >- # take out the if/fi block and inform me please. >- # unpack_2_6 should now be 2.6.17 safe anyways >- if [[ ${ETYPE} == headers ]]; then >- kernel_is 2 4 && unpack_2_4 >- kernel_is 2 6 && unpack_2_6 >+ if [[ -z ${K_NOSETEXTRAVERSION} ]]; then >+ debug-print "Doing unpack_set_extraversion" >+ unpack_set_extraversion > fi > >+ unpack_fix_install_path >+ > if [[ $K_DEBLOB_AVAILABLE == 1 ]] && use deblob ; then >+ debug-print "Handle deblob" > cp "${DISTDIR}/${DEBLOB_A}" "${T}" || die "cp ${DEBLOB_A} failed" > cp "${DISTDIR}/${DEBLOB_CHECK_A}" "${T}/deblob-check" || die "cp ${DEBLOB_CHECK_A} failed" > chmod +x "${T}/${DEBLOB_A}" "${T}/deblob-check" || die "chmod deblob scripts failed" >@@ -1498,32 +1532,18 @@ kernel-2_src_unpack() { > # only do this for kernel < 2.6.27 since this file does not exist in later > # kernels > if [[ -n ${KV_MINOR} && ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH} < 2.6.27 ]] ; then >+ debug-print "TOUT fix for <kernel-2.6.27 applied" > sed -i \ > -e 's|TOUT := .tmp_gas_check|TOUT := $(T).tmp_gas_check|' \ > "${S}"/arch/ppc/Makefile > else >+ debug-print "TOUT fix for >=kernel-2.6.27 applied" > sed -i \ > -e 's|TOUT := .tmp_gas_check|TOUT := $(T).tmp_gas_check|' \ > "${S}"/arch/powerpc/Makefile > fi > } > >-# @FUNCTION: kernel-2_src_prepare >-# @USAGE: >-# @DESCRIPTION: >-# Apply any user patches >- >-kernel-2_src_prepare() { >- >- debug-print "Applying any user patches" >- >- # apply any user patches >- case ${EAPI:-0} in >- 0|1|2|3|4|5) epatch_user ;; >- 6) eapply_user ;; >- esac >-} >- > # @FUNCTION: kernel-2_src_compile > # @USAGE: > # @DESCRIPTION:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 657926
: 542822