* [gentoo-kernel] Installation location in kernel-2.eclass
@ 2006-07-23 20:44 Daniel Gryniewicz
0 siblings, 0 replies; only message in thread
From: Daniel Gryniewicz @ 2006-07-23 20:44 UTC (permalink / raw
To: gentoo-kernel
[-- Attachment #1.1: Type: text/plain, Size: 1147 bytes --]
Hey, all.
UML is a bit of a unique animal, in the kernel world. You install it on
a box, and run it on that box, but it's not the kernel for that box.
For this reason, I think it would be useful to be able to install UML
into a different location than /usr/src. I, for example, always do my
UML work in /home/os/uml, and would like to install it there. I could
symlink, but that would break my bind mounts, and cause other problems,
so I always end up copying it.
Unfortunately, kernel-2.eclass hardcodes the install directory to
be /usr/src. To get around this problem, I propose that a variable be
added to kernel-2.eclass (I named it K_TARGETDIR) that can be set in an
ebuild to install to somewhere else than /usr/src. It should default,
of course, to /usr/src. In usermode-sources, I'd use this as follows:
K_TARGETDIR=${USERMODE_TARGET_DIR:-"/usr/src"}
This would allow the user to specify USERMODE_TARGET_DIR in either
make.conf or on the command line, and install usermode-sources in that
directory, rather than /usr/src.
What do people think about this idea? Is there a better way to do this?
Daniel
[-- Attachment #1.2: k_targetdir.patch --]
[-- Type: text/x-patch, Size: 739 bytes --]
Index: kernel-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v
retrieving revision 1.182
diff -u -p -r1.182 kernel-2.eclass
--- kernel-2.eclass 17 Jul 2006 14:30:18 -0000 1.182
+++ kernel-2.eclass 23 Jul 2006 20:40:51 -0000
@@ -562,7 +562,7 @@ install_sources() {
local doc docs file
cd "${S}"
- dodir /usr/src
+ dodir ${K_TARGETDIR:="/usr/src"}
echo ">>> Copying sources ..."
file="$(find ${WORKDIR} -iname "docs" -type d)"
@@ -591,7 +591,7 @@ install_sources() {
[[ -n ${docs} ]] && dodoc ${docs}
fi
- mv ${WORKDIR}/linux* ${D}/usr/src
+ mv ${WORKDIR}/linux* ${D}/${K_TARGETDIR}
}
install_manpages() {
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-07-23 20:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-23 20:44 [gentoo-kernel] Installation location in kernel-2.eclass Daniel Gryniewicz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox