# dont save debug info twice
[[ ${x} == *".debug" ]] && return 0
+ # this will recompute the build-id, but for now that's ok
+ local buildid="$( type -P debugedit >/dev/null && debugedit -i "${x}" )"
+
mkdir -p $(dirname "${y}")
${OBJCOPY} --only-keep-debug "${x}" "${y}"
${OBJCOPY} --add-gnu-debuglink="${y}" "${x}"
[[ -g ${x} ]] && chmod go-r "${y}"
[[ -u ${x} ]] && chmod go-r "${y}"
chmod a-x,o-w "${y}"
+
+ if [[ -n ${buildid} ]] ; then
+ local buildid_dir="${D}usr/lib/debug/.build-id/${buildid:0:2}"
+ local buildid_file="${buildid_dir}/${buildid:2}"
+ mkdir -p "${buildid_dir}"
+ ln -s "../../${x:${#D}}.debug" "${buildid_file}.debug"
+ ln -s "/${x:${#D}}" "${buildid_file}"
+ fi
}
# The existance of the section .symtab tells us that a binary is stripped.
</table>
</section>
</section>
- <section id='package-ebuild-eapi-2-draft-helpers-unpack'>
- <title>unpack</title>
- <section id='package-ebuild-eapi-2-draft-helpers-unpack-gitweb-snapshots'>
- <title>Gitweb Snapshots</title>
- <para>
- To aid interoperatiblity with gitweb, files with the suffixes of ;sf=tbz2
- and ;sf=tgz are now treated as .tar.bz2 and .tar.gz archives, respectively.
- This allows for ebuilds to consume gitweb snapshots and still use the
- default src_unpack implementation.
- </para>
- </section>
- </section>
</section>
<section id='package-ebuild-eapi-2-draft-metadata'>
<title>Metadata</title>
</tbody>
</tgroup>
</table>
- <para>
- The default phase functions for a particular EAPI are also
- accessible as functions having names that start with 'eapi'
- followed by the EAPI value. For example, a call to a function
- named eapi0_src_compile is equivalent to a call to the
- default src_compile implementation that is provided with EAPI 0.
- </para>
- <table><title>Default EAPI Phase Functions</title>
- <tgroup cols='1' align='left' >
- <colspec colname='name'/>
- <thead>
- <row>
- <entry>Function Name</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>eapi0_pkg_nofetch</entry>
- </row>
- <row>
- <entry>eapi0_src_unpack</entry>
- </row>
- <row>
- <entry>eapi0_src_compile</entry>
- </row>
- <row>
- <entry>eapi0_src_test</entry>
- </row>
- <row>
- <entry>eapi1_pkg_nofetch</entry>
- </row>
- <row>
- <entry>eapi1_src_unpack</entry>
- </row>
- <row>
- <entry>eapi1_src_compile</entry>
- </row>
- <row>
- <entry>eapi1_src_test</entry>
- </row>
- <row>
- <entry>eapi2_pkg_nofetch</entry>
- </row>
- <row>
- <entry>eapi2_src_unpack</entry>
- </row>
- <row>
- <entry>eapi2_src_prepare</entry>
- </row>
- <row>
- <entry>eapi2_src_configure</entry>
- </row>
- <row>
- <entry>eapi2_src_compile</entry>
- </row>
- <row>
- <entry>eapi2_src_test</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
</section>
<section id='package-ebuild-eapi-2-draft-phases-default-function-alias'>
<title>Default Phase Function Alias</title>