Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 162016 Details for
Bug 233735
Support src_configure and some default_* functions
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
portage-src_configure+default-functions.patch
portage-src_configure+default-functions.patch (text/plain), 10.73 KB, created by
Arfrever Frehtes Taifersar Arahesis (RETIRED)
on 2008-08-02 18:57:24 UTC
(
hide
)
Description:
portage-src_configure+default-functions.patch
Filename:
MIME Type:
Creator:
Arfrever Frehtes Taifersar Arahesis (RETIRED)
Created:
2008-08-02 18:57:24 UTC
Size:
10.73 KB
patch
obsolete
>Index: pym/portage/__init__.py >=================================================================== >--- pym/portage/__init__.py (revision 11319) >+++ pym/portage/__init__.py (working copy) >@@ -5042,7 +5042,8 @@ > actionmap_deps={ > "setup": [], > "unpack": ["setup"], >- "compile":["unpack"], >+ "configure": ["unpack"], >+ "compile":["configure"], > "test": ["compile"], > "install":["test"], > "rpm": ["install"], >@@ -5063,7 +5064,7 @@ > validcommands = ["help","clean","prerm","postrm","cleanrm","preinst","postinst", > "config", "info", "setup", "depend", > "fetch", "fetchall", "digest", >- "unpack","compile","test","install","rpm","qmerge","merge", >+ "unpack", "configure", "compile","test","install","rpm","qmerge", "merge", > "package","unmerge", "manifest"] > > if mydo not in validcommands: >@@ -5617,13 +5618,14 @@ > > # args are for the to spawn function > actionmap = { >-"setup": {"cmd":ebuild_sh, "args":{"droppriv":0, "free":1, "sesandbox":0, "fakeroot":0}}, >-"unpack": {"cmd":ebuild_sh, "args":{"droppriv":droppriv, "free":0, "sesandbox":sesandbox, "fakeroot":0}}, >-"compile":{"cmd":ebuild_sh, "args":{"droppriv":droppriv, "free":nosandbox, "sesandbox":sesandbox, "fakeroot":0}}, >-"test": {"cmd":ebuild_sh, "args":{"droppriv":droppriv, "free":nosandbox, "sesandbox":sesandbox, "fakeroot":0}}, >-"install":{"cmd":ebuild_sh, "args":{"droppriv":0, "free":0, "sesandbox":sesandbox, "fakeroot":fakeroot}}, >-"rpm": {"cmd":misc_sh, "args":{"droppriv":0, "free":0, "sesandbox":0, "fakeroot":fakeroot}}, >-"package":{"cmd":misc_sh, "args":{"droppriv":0, "free":0, "sesandbox":0, "fakeroot":fakeroot}}, >+"setup": {"cmd":ebuild_sh, "args":{"droppriv":0, "free":1, "sesandbox":0, "fakeroot":0}}, >+"unpack": {"cmd":ebuild_sh, "args":{"droppriv":droppriv, "free":0, "sesandbox":sesandbox, "fakeroot":0}}, >+"configure":{"cmd":ebuild_sh, "args":{"droppriv":droppriv, "free":nosandbox, "sesandbox":sesandbox, "fakeroot":0}}, >+"compile": {"cmd":ebuild_sh, "args":{"droppriv":droppriv, "free":nosandbox, "sesandbox":sesandbox, "fakeroot":0}}, >+"test": {"cmd":ebuild_sh, "args":{"droppriv":droppriv, "free":nosandbox, "sesandbox":sesandbox, "fakeroot":0}}, >+"install": {"cmd":ebuild_sh, "args":{"droppriv":0, "free":0, "sesandbox":sesandbox, "fakeroot":fakeroot}}, >+"rpm": {"cmd":misc_sh, "args":{"droppriv":0, "free":0, "sesandbox":0, "fakeroot":fakeroot}}, >+"package": {"cmd":misc_sh, "args":{"droppriv":0, "free":0, "sesandbox":0, "fakeroot":fakeroot}}, > } > > # merge the deps in so we have again a 'full' actionmap >Index: pym/_emerge/__init__.py >=================================================================== >--- pym/_emerge/__init__.py (revision 11319) >+++ pym/_emerge/__init__.py (working copy) >@@ -2587,7 +2587,7 @@ > > __slots__ = ("pkg", "scheduler", "settings") + ("_tree",) > >- _phases = ("compile", "test", "install") >+ _phases = ("configure", "compile", "test", "install") > > _live_eclasses = frozenset([ > "cvs", >Index: bin/ebuild >=================================================================== >--- bin/ebuild (revision 11319) >+++ bin/ebuild (working copy) >@@ -182,7 +182,7 @@ > tmpsettings.backup_changes("EBUILD_SKIP_MANIFEST") > portage._doebuild_manifest_exempt_depend += 1 > >-build_dir_phases = set(["setup", "unpack", "compile", >+build_dir_phases = set(["setup", "unpack", "configure", "compile", > "test", "install", "package", "rpm"]) > > def stale_env_warning(): >Index: bin/isolated-functions.sh >=================================================================== >--- bin/isolated-functions.sh (revision 11319) >+++ bin/isolated-functions.sh (working copy) >@@ -499,12 +499,14 @@ > best_version use_with use_enable register_die_hook check_KV \ > keepdir unpack strip_duplicate_slashes econf einstall \ > dyn_setup dyn_unpack dyn_clean into insinto exeinto docinto \ >- insopts diropts exeopts libopts abort_handler abort_compile \ >- abort_test abort_install dyn_compile dyn_test dyn_install \ >+ insopts diropts exeopts libopts abort_handler abort_configure \ >+ abort_compile abort_test abort_install default_pkg_nofetch \ >+ default_src_unpack default_src_configure default_src_compile \ >+ default_src_test dyn_configure dyn_compile dyn_test dyn_install \ > dyn_preinst dyn_help debug-print debug-print-function \ > debug-print-section inherit EXPORT_FUNCTIONS newdepend newrdepend \ >- newpdepend do_newdepend remove_path_entry \ >- save_ebuild_env filter_readonly_variables preprocess_ebuild_env \ >+ newpdepend do_newdepend remove_path_entry save_ebuild_env \ >+ filter_readonly_variables preprocess_ebuild_env \ > source_all_bashrcs ebuild_phase ebuild_phase_with_hooks \ > ${QA_INTERCEPTORS} > >Index: bin/ebuild.sh >=================================================================== >--- bin/ebuild.sh (revision 11319) >+++ bin/ebuild.sh (working copy) >@@ -583,7 +583,7 @@ > fi > } > >-pkg_nofetch() { >+default_pkg_nofetch() { > [ -z "${SRC_URI}" ] && return > > echo "!!! The following are listed in SRC_URI for ${PN}:" >@@ -593,22 +593,25 @@ > done > } > >-src_unpack() { >+default_src_unpack() { > [[ -n ${A} ]] && unpack ${A} > } > >-src_compile() { >+default_src_configure() { > if [ "${EAPI:-0}" == 0 ] ; then > [ -x ./configure ] && econf > elif [ -x "${ECONF_SOURCE:-.}/configure" ] ; then > econf > fi >+} >+ >+default_src_compile() { > if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then > emake || die "emake failed" > fi > } > >-src_test() { >+default_src_test() { > if emake -j1 check -n &> /dev/null; then > vecho ">>> Test phase [check]: ${CATEGORY}/${PF}" > if ! emake -j1 check; then >@@ -626,6 +629,29 @@ > fi > } > >+pkg_nofetch() { >+ default_pkg_nofetch >+} >+ >+src_unpack() { >+ default_src_unpack >+} >+ >+src_configure() { >+ default_src_configure >+} >+ >+src_compile() { >+ if [[ "${EAPI:-0}" == [01] ]] ; then >+ default_src_configure >+ fi >+ default_src_compile >+} >+ >+src_test() { >+ default_src_test >+} >+ > ebuild_phase() { > [ "$(type -t ${1})" == "function" ] && qa_call ${1} > } >@@ -822,6 +848,12 @@ > trap SIGINT SIGQUIT > } > >+abort_configure() { >+ abort_handler "src_configure" $1 >+ rm -f "${PORTAGE_BUILDDIR}/.configured" >+ exit 1 >+} >+ > abort_compile() { > abort_handler "src_compile" $1 > rm -f "${PORTAGE_BUILDDIR}/.compiled" >@@ -840,6 +872,79 @@ > exit 1 > } > >+dyn_configure() { >+ if [[ "${EAPI:-0}" != [01] ]] ; then >+ trap "abort_configure" SIGINT SIGQUIT >+ >+ [ "$(type -t pre_src_configure)" == "function" ] && qa_call pre_src_configure >+ >+ [ "${CFLAGS-unset}" != "unset" ] && export CFLAGS >+ [ "${CXXFLAGS-unset}" != "unset" ] && export CXXFLAGS >+ [ "${LIBCFLAGS-unset}" != "unset" ] && export LIBCFLAGS >+ [ "${LIBCXXFLAGS-unset}" != "unset" ] && export LIBCXXFLAGS >+ [ "${LDFLAGS-unset}" != "unset" ] && export LDFLAGS >+ [ "${ASFLAGS-unset}" != "unset" ] && export ASFLAGS >+ >+ LIBDIR_VAR="LIBDIR_${ABI}" >+ if [ -z "${PKG_CONFIG_PATH}" -a -n "${ABI}" -a -n "${!LIBDIR_VAR}" ]; then >+ export PKG_CONFIG_PATH="/usr/${!LIBDIR_VAR}/pkgconfig" >+ fi >+ unset LIBDIR_VAR >+ >+ if hasq noauto $FEATURES && [ ! -f ${PORTAGE_BUILDDIR}/.unpacked ]; then >+ echo >+ echo "!!! We apparently haven't unpacked... This is probably not what you" >+ echo "!!! want to be doing... You are using FEATURES=noauto so I'll assume" >+ echo "!!! that you know what you are doing... You have 5 seconds to abort..." >+ echo >+ >+ local x >+ for x in 1 2 3 4 5 6 7 8; do >+ echo -ne "\a" >+ LC_ALL=C sleep 0.25 >+ done >+ >+ sleep 3 >+ fi >+ >+ local srcdir=${PORTAGE_BUILDDIR} >+ cd "${PORTAGE_BUILDDIR}" >+ if [ ! -e "build-info" ]; then >+ mkdir build-info >+ fi >+ cp "${EBUILD}" "build-info/${PF}.ebuild" >+ >+ if [[ ${PORTAGE_BUILDDIR}/.configured -nt ${WORKDIR} ]] ; then >+ vecho ">>> It appears that '${PF}' is already configured; skipping." >+ vecho ">>> Remove '${PORTAGE_BUILDDIR}/.configured' to force configuration." >+ trap SIGINT SIGQUIT >+ [ "$(type -t post_src_configure)" == "function" ] && qa_call post_src_configure >+ return >+ fi >+ if [ -d "${S}" ]; then >+ srcdir=${S} >+ else >+ srcdir=${WORKDIR} >+ fi >+ cd "${srcdir}" >+ #our custom version of libtool uses $S and $D to fix >+ #invalid paths in .la files >+ export S D >+ #some packages use an alternative to $S to build in, cause >+ #our libtool to create problematic .la files >+ export PWORKDIR="$WORKDIR" >+ vecho ">>> Configuring source in ${srcdir} ..." >+ ebuild_phase src_configure >+ vecho ">>> Source configured." >+ #|| abort_configure "fail" >+ cd "${PORTAGE_BUILDDIR}" >+ touch .configured >+ [ "$(type -t post_src_configure)" == "function" ] && qa_call post_src_configure >+ >+ trap SIGINT SIGQUIT >+ fi >+} >+ > dyn_compile() { > trap "abort_compile" SIGINT SIGQUIT > >@@ -864,20 +969,22 @@ > fi > unset LIBDIR_VAR > >- if hasq noauto $FEATURES && [ ! -f ${PORTAGE_BUILDDIR}/.unpacked ]; then >- echo >- echo "!!! We apparently haven't unpacked... This is probably not what you" >- echo "!!! want to be doing... You are using FEATURES=noauto so I'll assume" >- echo "!!! that you know what you are doing... You have 5 seconds to abort..." >- echo >+ if [[ "${EAPI:-0}" == [01] ]] ; then >+ if hasq noauto $FEATURES && [ ! -f ${PORTAGE_BUILDDIR}/.unpacked ]; then >+ echo >+ echo "!!! We apparently haven't unpacked... This is probably not what you" >+ echo "!!! want to be doing... You are using FEATURES=noauto so I'll assume" >+ echo "!!! that you know what you are doing... You have 5 seconds to abort..." >+ echo > >- local x >- for x in 1 2 3 4 5 6 7 8; do >- echo -ne "\a" >- LC_ALL=C sleep 0.25 >- done >+ local x >+ for x in 1 2 3 4 5 6 7 8; do >+ echo -ne "\a" >+ LC_ALL=C sleep 0.25 >+ done > >- sleep 3 >+ sleep 3 >+ fi > fi > > local srcdir=${PORTAGE_BUILDDIR} >@@ -1059,8 +1166,9 @@ > echo " digest : create a manifest file for the package" > echo " manifest : create a manifest file for the package" > echo " unpack : unpack/patch sources (auto-fetch if needed)" >- echo " compile : compile sources (auto-fetch/unpack if needed)" >- echo " test : test package (auto-fetch/unpack/compile if needed)" >+ echo " configure : configure sources (auto-fetch/unpack if needed)" >+ echo " compile : compile sources (auto-fetch/unpack/configure if needed)" >+ echo " test : test package (auto-fetch/unpack/configure/compile if needed)" > echo " preinst : execute pre-install instructions" > echo " postinst : execute post-install instructions" > echo " install : install the package to the temporary install directory" >@@ -1786,7 +1894,7 @@ > ) > fi > ;; >- unpack|compile|test|clean|install) >+ unpack|configure|compile|test|clean|install) > if [ "${SANDBOX_DISABLED="0"}" == "0" ]; then > export SANDBOX_ON="1" > else
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 233735
: 162016