Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 88110 Details for
Bug 135181
Prototype for new eclass: override.eclass
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
override.eclass
override.eclass (text/plain), 1.97 KB, created by
Dani Church
on 2006-06-01 10:08:46 UTC
(
hide
)
Description:
override.eclass
Filename:
MIME Type:
Creator:
Dani Church
Created:
2006-06-01 10:08:46 UTC
Size:
1.97 KB
patch
obsolete
># Copyright 1999-2006 Gentoo Foundation ># Distributed under the terms of the GNU General Public License v2 ># $Header: $ > ># ># Original Author: churchda ># Purpose: Allows overriding the behavior of default Gentoo ebuilds. ># > >ECLASS="override" >INHERITED="$INHERITED $ECLASS" > >for func in pkg_setup pkg_nofetch src_unpack src_compile src_install src_test pkg_preinst pkg_postinst pkg_prerm pkg_postrm pkg_config; do > eval "override_`declare -f $func`" >done >unset func > >EXPORT_FUNCTIONS pkg_setup pkg_nofetch src_unpack src_compile src_install src_test pkg_preinst pkg_postinst pkg_prerm pkg_postrm pkg_config > >override_read_ebuild() { > local pkgname=$OVERRIDE_CAT/$OVERRIDE_PKG > local package=$OVERRIDE_PKG > local line > local IFS_save="$IFS" > > IFS="" > { > local overfuncs="`declare -f override_src_{unpack,compile,install,test} 2>/dev/null`" > echo "${overfuncs//override_}" > cat /usr/portage/$pkgname/$package-$PVR.ebuild > } | while read line; do > line="${line//{PN\}/{OVERRIDE_PN\\remove\}}" > line="${line//{P\}/{OVERRIDE_P\\remove\}}" > line="${line//{PF\}/{OVERRIDE_PF\\remove\}}" > line="${line//\\remove\\}" > line="${line//FILESDIR/OVERRIDE_FILESDIR}" > line="${line//pkg_/override_pkg_}" > line="${line//src_/override_src_}" > echo "${line}" > done > IFS="${IFS_save}" >} > >override_import_ebuild() { > local pkgname=$OVERRIDE_CAT/$OVERRIDE_PKG > > OVERRIDE_PN=$package > OVERRIDE_P=$OVERRIDE_PN-$PV > OVERRIDE_PF=$OVERRIDE_PN-$PVR > OVERRIDE_FILESDIR=/usr/portage/$pkgname/files > > local override_ebuild="`override_read_ebuild`" > S="${WORKDIR}/${OVERRIDE_P}" > eval "$override_ebuild" >} > >override() { > alongside "$@" > RDEPEND="${RDEPEND} > !$pkgname" >} > >alongside() { > local pkgname=$1 > local category=${pkgname%%/*} > local package=${pkgname##*/} > > [ -d /usr/portage/$pkgname ] || die "override: $pkgname is not a valid package." > [ -f /usr/portage/$pkgname/$package-$PVR.ebuild ] || die "override: $pkgname does not have an ebuild for version $PVR" > OVERRIDE_CAT=$category > OVERRIDE_PKG=$package > > override_import_ebuild >} >
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 135181
: 88110 |
88113
|
88115