Separation of kerncache from snapcache
authorEric Edgar <rocket@gentoo.org>
Thu, 26 Jan 2006 19:56:32 +0000 (19:56 +0000)
committerEric Edgar <rocket@gentoo.org>
Thu, 26 Jan 2006 19:56:32 +0000 (19:56 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@1043 d1e1f19c-881f-0410-ab34-b69fee027534

ChangeLog
examples/generic_stage_template.spec
examples/grp_template.spec
examples/livecd-stage1_template.spec
examples/livecd-stage2_template.spec
examples/netboot2_template.spec
examples/netboot_template.spec
examples/stage4_template.spec
examples/tinderbox_template.spec
modules/generic_stage_target.py
targets/support/kmerge.sh

index e521dfb1fcbd39f31501ab97b1abda81375532ed..1ad87e4133c4dc31f3ac0c404eabc9a65672b448 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 # Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.528 2006/01/26 15:36:46 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.529 2006/01/26 19:56:32 rocket Exp $
+
+  26 Jan 2006; Eric Edgar <rocket@gentoo.org>
+  examples/generic_stage_template.spec, examples/grp_template.spec,
+  examples/livecd-stage1_template.spec,
+  examples/livecd-stage2_template.spec, examples/netboot2_template.spec,
+  examples/netboot_template.spec, examples/stage4_template.spec,
+  examples/tinderbox_template.spec, modules/generic_stage_target.py,
+  targets/support/kmerge.sh:
+  Separation of kerncache from snapcache
 
   26 Jan 2006; Chris Gianelloni <wolf31o2@gentoo.org> catalyst:
   It helps if I actually increment the version number.
index 4094890c415940362e591ce3ffd4e09ca17ba5b3..7bc3d9ce82652ed8d05f97d0461b69752ba878f3 100644 (file)
@@ -91,3 +91,9 @@ cxxflags:
 # example:
 # ldflags: -Wl,-O1 -Wl,-z,now
 ldflags:
+
+# Setting the option overrides the location of the pkgcache
+pkgcache_path:
+
+# Setting the option overrides the location of the kerncache
+kerncache_path:
index 3e5e31639ad2596233905877bf99b35481369ff8..4ccbc2e3cfc2dda12f633002d19fca36a8814b75 100644 (file)
@@ -106,3 +106,10 @@ grp/cd2/type:
 # example:
 # grp/cd2/packages: dante tsocks sys-apps/eject minicom links acpid apmd parted whois tcpdump cvs zip unzip netcat partimage app-admin/sudo app-cdr/cdrtools gnome emacs dev-lang/ruby enlightenment kde mozilla-firefox mozilla-thunderbird xfce4 openbox fluxbox sylpheed openoffice-bin gimp xemacs xmms abiword gaim xchat pan tetex xcdroast k3b samba nmap gradm ettercap ethereal mplayer
 grp/cd2/packages:
+
+# Setting the option overrides the location of the pkgcache
+pkgcache_path:
+
+# Setting the option overrides the location of the kerncache
+kerncache_path:
+
index cadeac20c42634fa8ee20369e963d8b94cc9040f..529881b792faebf1631b22ce51502f0517074cfe 100644 (file)
@@ -80,3 +80,8 @@ livecd/use:
 # example:
 # livecd/packages: livecd-tools dhcpcd acpid apmd gentoo-sources coldplug fxload irssi gpm syslog-ng parted links raidtools dosfstools nfs-utils jfsutils xfsprogs e2fsprogs reiserfsprogs ntfsprogs pwgen rp-pppoe screen mirrorselect penggy iputils hwdata-knoppix hwsetup lvm2 evms vim pptpclient mdadm ethtool wireless-tools prism54-firmware wpa_supplicant
 livecd/packages:
+
+# Setting the option overrides the location of the pkgcache
+pkgcache_path:
+
+
index 770ef1d38d73b6be518e7886f777dd92d89f879b..97d39391bfb33f63ad05057b3f012daa9b6a9560 100644 (file)
@@ -318,3 +318,10 @@ livecd/empty:
 # example:
 # livecd/rm: /lib/*.a /usr/lib/*.a /usr/lib/gcc-lib/*/*/libgcj* /etc/dispatch-conf.conf /etc/etc-update.conf /etc/*- /etc/issue* /etc/make.conf /etc/man.conf /etc/*.old /root/.viminfo /usr/sbin/bootsplash* /usr/sbin/fb* /usr/sbin/fsck.cramfs /usr/sbin/fsck.minix /usr/sbin/mkfs.minix /usr/sbin/mkfs.bfs /usr/sbin/mkfs.cramfs /lib/security/pam_access.so /lib/security/pam_chroot.so /lib/security/pam_debug.so /lib/security/pam_ftp.so /lib/security/pam_issue.so /lib/security/pam_mail.so /lib/security/pam_motd.so /lib/security/pam_mkhomedir.so /lib/security/pam_postgresok.so /lib/security/pam_rhosts_auth.so /lib/security/pam_userdb.so /usr/share/consolefonts/1* /usr/share/consolefonts/7* /usr/share/consolefonts/8* /usr/share/consolefonts/9* /usr/share/consolefonts/A* /usr/share/consolefonts/C* /usr/share/consolefonts/E* /usr/share/consolefonts/G* /usr/share/consolefonts/L* /usr/share/consolefonts/M* /usr/share/consolefonts/R* /usr/share/consolefonts/a* /usr/share/consolefonts/c* /usr/share/consolefonts/dr* /usr/share/consolefonts/g* /usr/share/consolefonts/i* /usr/share/consolefonts/k* /usr/share/consolefonts/l* /usr/share/consolefonts/r* /usr/share/consolefonts/s* /usr/share/consolefonts/t* /usr/share/consolefonts/v* /etc/splash/livecd-2005.0/16* /etc/splash/livecd-2005.0/12* /etc/splash/livecd-2005.0/6* /etc/splash/livecd-2005.0/8* /etc/splash/livecd-2005.0/images/silent-16* /etc/splash/livecd-2005.0/images/silent-12* /etc/splash/livecd-2005.0/images/silent-6* /etc/splash/livecd-2005.0/images/silent-8* /etc/splash/livecd-2005.0/images/verbose-16* /etc/splash/livecd-2005.0/images/verbose-12* /etc/splash/livecd-2005.0/images/verbose-6* /etc/splash/livecd-2005.0/images/verbose-8* /etc/make.conf.example /etc/make.globals /etc/resolv.conf
 livecd/rm:
+
+# Setting the option overrides the location of the pkgcache
+pkgcache_path:
+
+# Setting the option overrides the location of the kerncache
+kerncache_path:
+
index a1bd1351e5157273cdead886d71b56a3c9779556..fe10b27474d8389df102865d383b2d879ab3e632 100644 (file)
@@ -286,3 +286,10 @@ netboot2/packages/xfsprogs/files:
        /sbin/fsck.xfs
        /sbin/mkfs.xfs
        /sbin/xfs_repair
+
+# Setting the option overrides the location of the pkgcache
+pkgcache_path:
+
+# Setting the option overrides the location of the kerncache
+kerncache_path:
+
index 41d3335d4234d2f1021437c550164b46d6d04ef7..2caf28fbee4f741d148462fb4a431e4b7be57e30 100644 (file)
@@ -124,3 +124,10 @@ netboot/packages/reiserfsprogs/files:
 # example:
 # netboot/extra_files: /lib/libresolv.so.2 /lib/libnss_compat.so.2 /lib/libnss_dns.so.2 /lib/libnss_files.so.2 /sbin/consoletype
 netboot/extra_files:
+
+# Setting the option overrides the location of the pkgcache
+pkgcache_path:
+
+# Setting the option overrides the location of the kerncache
+kerncache_path:
+
index e523d50f46b56bd34145a6fa06453518cd86ec28..f5d87f792c7c26de0199f3a60984313ffc228958 100644 (file)
@@ -256,3 +256,10 @@ stage4/empty:
 # example:
 # stage4/rm: /lib/*.a /usr/lib/*.a /usr/lib/gcc-lib/*/*/libgcj* /etc/dispatch-conf.conf /etc/etc-update.conf /etc/*- /etc/issue* /etc/make.conf /etc/man.conf /etc/*.old /root/.viminfo /usr/sbin/bootsplash* /usr/sbin/fb* /usr/sbin/fsck.cramfs /usr/sbin/fsck.minix /usr/sbin/mkfs.minix /usr/sbin/mkfs.bfs /usr/sbin/mkfs.cramfs /lib/security/pam_access.so /lib/security/pam_chroot.so /lib/security/pam_debug.so /lib/security/pam_ftp.so /lib/security/pam_issue.so /lib/security/pam_mail.so /lib/security/pam_motd.so /lib/security/pam_mkhomedir.so /lib/security/pam_postgresok.so /lib/security/pam_rhosts_auth.so /lib/security/pam_userdb.so /usr/share/consolefonts/1* /usr/share/consolefonts/7* /usr/share/consolefonts/8* /usr/share/consolefonts/9* /usr/share/consolefonts/A* /usr/share/consolefonts/C* /usr/share/consolefonts/E* /usr/share/consolefonts/G* /usr/share/consolefonts/L* /usr/share/consolefonts/M* /usr/share/consolefonts/R* /usr/share/consolefonts/a* /usr/share/consolefonts/c* /usr/share/consolefonts/dr* /usr/share/consolefonts/g* /usr/share/consolefonts/i* /usr/share/consolefonts/k* /usr/share/consolefonts/l* /usr/share/consolefonts/r* /usr/share/consolefonts/s* /usr/share/consolefonts/t* /usr/share/consolefonts/v* /etc/splash/livecd-2005.0/16* /etc/splash/livecd-2005.0/12* /etc/splash/livecd-2005.0/6* /etc/splash/livecd-2005.0/8* /etc/splash/livecd-2005.0/images/silent-16* /etc/splash/livecd-2005.0/images/silent-12* /etc/splash/livecd-2005.0/images/silent-6* /etc/splash/livecd-2005.0/images/silent-8* /etc/splash/livecd-2005.0/images/verbose-16* /etc/splash/livecd-2005.0/images/verbose-12* /etc/splash/livecd-2005.0/images/verbose-6* /etc/splash/livecd-2005.0/images/verbose-8* /etc/make.conf.example /etc/make.globals /etc/resolv.conf
 stage4/rm:
+
+# Setting the option overrides the location of the pkgcache
+pkgcache_path:
+
+# Setting the option overrides the location of the kerncache
+kerncache_path:
+
index db09899e1711bef2c4b6050ead931485414f3897..d26d880c345cb93df002055c7acfb908e8b7d95c 100644 (file)
@@ -78,3 +78,10 @@ tinderbox/use:
 # exampleL
 # tinderbox/packages: dante tsocks sys-apps/eject minicom links acpid apmd parted whois tcpdump cvs zip unzip netcat partimage app-admin/sudo app-cdr/cdrtools gnome emacs dev-lang/ruby enlightenment kde mozilla-firefox mozilla-thunderbird xfce4 openbox fluxbox sylpheed openoffice-bin gimp xemacs xmms abiword gaim xchat pan tetex xcdroast k3b samba nmap gradm ettercap ethereal mplayer
 tinderbox/packages:
+
+# Setting the option overrides the location of the pkgcache
+pkgcache_path:
+
+# Setting the option overrides the location of the kerncache
+kerncache_path:
+
index 9989af8fef4293b62e52ae1b02440c817b53a814..cf6631b7b20a5f4530bcd5f0b854f9418c240a6f 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.122 2006/01/25 16:07:35 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.123 2006/01/26 19:56:32 rocket Exp $
 
 """
 This class does all of the chroot setup, copying of files, etc. It is
@@ -20,7 +20,8 @@ class generic_stage_target(generic_target):
                
                self.valid_values.extend(["version_stamp","target","subarch","rel_type","profile",\
                        "snapshot","source_subpath","portage_confdir","cflags","cxxflags",\
-                       "ldflags","chost","hostuse","portage_overlay","distcc_hosts","makeopts"])
+                       "ldflags","chost","hostuse","portage_overlay","distcc_hosts","makeopts",\
+                       "pkgcache_path","kerncache_path"])
                
                self.set_valid_build_kernel_vars(addlargs)
                generic_target.__init__(self,myspec,addlargs)
@@ -177,6 +178,12 @@ class generic_stage_target(generic_target):
                        print "Location of the package cache is " + self.settings["pkgcache_path"]
                        self.mounts.append("/usr/portage/packages")
                        self.mountmap["/usr/portage/packages"]=self.settings["pkgcache_path"]
+               
+               if self.settings.has_key("KERNCACHE"):
+                       self.set_kerncache_path()
+                       print "Location of the kerncache is " + self.settings["kerncache_path"]
+                       self.mounts.append("/tmp/kerncache")
+                       self.mountmap["/tmp/kerncache"]=self.settings["kerncache_path"]
 
                if self.settings.has_key("CCACHE"):
                        if os.environ.has_key("CCACHE_DIR"):
@@ -251,9 +258,17 @@ class generic_stage_target(generic_target):
                if self.settings.has_key("pkgcache_path"):
                        if type(self.settings["pkgcache_path"]) != types.StringType:
                                self.settings["pkgcache_path"]=normpath(string.join(self.settings["pkgcache_path"]))
+               else:
+                       self.settings["pkgcache_path"]=normpath(self.settings["storedir"]+"/packages/"+\
+                               self.settings["target_subpath"]+"/")
 
-               self.settings["pkgcache_path"]=normpath(self.settings["storedir"]+"/packages/"+\
-                       self.settings["target_subpath"]+"/")
+       def set_kerncache_path(self):
+               if self.settings.has_key("kerncache_path"):
+                       if type(self.settings["kerncache_path"]) != types.StringType:
+                               self.settings["kerncache_path"]=normpath(string.join(self.settings["kerncache_path"]))
+               else:
+                       self.settings["kerncache_path"]=normpath(self.settings["storedir"]+"/kerncache/"+\
+                               self.settings["target_subpath"]+"/")
 
        def set_target_path(self):
                self.settings["target_path"]=normpath(self.settings["storedir"]+"/builds/"+\
@@ -618,6 +633,10 @@ class generic_stage_target(generic_target):
                                if not os.path.exists(self.settings["pkgcache_path"]):
                                        os.makedirs(self.settings["pkgcache_path"],0755)
                        
+                       if self.settings.has_key("KERNCACHE"):  
+                               if not os.path.exists(self.settings["kerncache_path"]):
+                                       os.makedirs(self.settings["kerncache_path"],0755)
+                       
                        print display_msg
                        cmd(unpack_cmd,error_msg,env=self.env)
 
@@ -1277,6 +1296,22 @@ class generic_stage_target(generic_target):
                    os.chown(myemp,mystat[ST_UID],mystat[ST_GID])
                    os.chmod(myemp,mystat[ST_MODE])
        
+       def clear_kerncache(self):
+           if self.settings.has_key("KERNCACHE"):
+               print "purging the kerncache ..."
+
+               myemp=self.settings["kerncache_path"]
+               if os.path.isdir(myemp):
+                   print "Emptying directory",myemp
+                   # stat the dir, delete the dir, recreate the dir and set
+                   # the proper perms and ownership
+                   mystat=os.stat(myemp)
+                   #cmd("rm -rf "+myemp, "Could not remove existing file: "+myemp,env=self.env)
+                   shutil.rmtree(myemp)
+                   os.makedirs(myemp,0755)
+                   os.chown(myemp,mystat[ST_UID],mystat[ST_GID])
+                   os.chmod(myemp,mystat[ST_MODE])
+       
        def clear_autoresume(self):
                # clean resume points since they are no longer needed
                if self.settings.has_key("AUTORESUME"):
@@ -1324,5 +1359,8 @@ class generic_stage_target(generic_target):
                
                print "clearing package cache ..."
                self.clear_packages()
+               
+               print "clearing kerncache ..."
+               self.clear_kerncache()
 
 #vim: ts=4 sw=4 sta et sts=4 ai
index 588a8197a9d82f08a537de8d2caf31081e91708f..a69109950ffd68c6f057e34daa90dcb51ea63f4c 100755 (executable)
@@ -4,21 +4,23 @@
 
 source /tmp/chroot-functions.sh
 
+mkdir -p /tmp/kerncache
+
 check_genkernel_version
 
-PKGDIR=/usr/portage/packages/gk_binaries/${clst_kname}/ebuilds
+PKGDIR=/tmp/kerncache/${clst_kname}/ebuilds
 
 setup_gk_args() {
        # default genkernel args
        GK_ARGS="${clst_gk_mainargs} \
                         ${clst_kernel_gk_kernargs} \
-                        --cachedir=/usr/portage/packages/gk_binaries/${clst_kname}-genkernel_cache-${clst_version_stamp} \
+                        --cachedir=/tmp/kerncache/${clst_kname}-genkernel_cache-${clst_version_stamp} \
                         --no-mountboot \
                         --kerneldir=/usr/src/linux \
                         --kernel-config=/var/tmp/${clst_kname}.config \
-                        --modulespackage=/usr/portage/packages/gk_binaries/${clst_kname}-modules-${clst_version_stamp}.tar.bz2 \
-                        --minkernpackage=/usr/portage/packages/gk_binaries/${clst_kname}-kernel-initrd-${clst_version_stamp}.tar.bz2 \
-                        --kerncache=/usr/portage/packages/gk_binaries/${clst_kname}-kerncache-${clst_version_stamp}.tar.bz2 all"
+                        --modulespackage=/tmp/kerncache/${clst_kname}-modules-${clst_version_stamp}.tar.bz2 \
+                        --minkernpackage=/tmp/kerncache/${clst_kname}-kernel-initrd-${clst_version_stamp}.tar.bz2 \
+                        --kerncache=/tmp/kerncache/${clst_kname}-kerncache-${clst_version_stamp}.tar.bz2 all"
        # extra genkernel options that we have to test for
        if [ "${clst_splash_type}" == "bootsplash" -a -n "${clst_splash_theme}" ]
        then
@@ -84,7 +86,7 @@ genkernel_compile(){
                        genkernel ${GK_ARGS} || exit 1
                fi
        fi
-       md5sum /var/tmp/${clst_kname}.config|awk '{print $1}' > /usr/portage/packages/gk_binaries/${clst_kname}/${clst_kname}-${clst_version_stamp}.CONFIG
+       md5sum /var/tmp/${clst_kname}.config|awk '{print $1}' > /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.CONFIG
 }
 
 build_kernel() {
@@ -121,9 +123,9 @@ eval "clst_ksource=\$clst_boot_kernel_${filtered_kname}_sources"
 # real benefit in using the pkgcache for kernel source ebuilds.
 
 USE_MATCH=0 
-if [ -e /usr/portage/packages/gk_binaries/${clst_kname}/${clst_kname}-${clst_version_stamp}.USE ]
+if [ -e /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.USE ]
 then
-       STR1=$(for i in `cat /usr/portage/packages/gk_binaries/${clst_kname}/${clst_kname}-${clst_version_stamp}.USE`; do echo $i; done|sort)
+       STR1=$(for i in `cat /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.USE`; do echo $i; done|sort)
        STR2=$(for i in ${clst_kernel_use}; do echo $i; done|sort)
        if [ "${STR1}" = "${STR2}" ]
        then 
@@ -132,18 +134,18 @@ then
        else
                if [ -n "${clst_KERNCACHE}" ]
                then
-               [ -d /usr/portage/packages/gk_binaries/${clst_kname}/ebuilds ] && \
-                       rm -r /usr/portage/packages/gk_binaries/${clst_kname}/ebuilds
-               [ -e /usr/portage/packages/gk_binaries/${clst_kname}/usr/src/linux/.config ] && \
-                       rm /usr/portage/packages/gk_binaries/${clst_kname}/usr/src/linux/.config
+               [ -d /tmp/kerncache/${clst_kname}/ebuilds ] && \
+                       rm -r /tmp/kerncache/${clst_kname}/ebuilds
+               [ -e /tmp/kerncache/${clst_kname}/usr/src/linux/.config ] && \
+                       rm /tmp/kerncache/${clst_kname}/usr/src/linux/.config
                fi
        fi
 fi
 
 EXTRAVERSION_MATCH=0
-if [ -e /usr/portage/packages/gk_binaries/${clst_kname}/${clst_kname}-${clst_version_stamp}.EXTRAVERSION ]
+if [ -e /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.EXTRAVERSION ]
 then
-       STR1=`cat /usr/portage/packages/gk_binaries/${clst_kname}/${clst_kname}-${clst_version_stamp}.EXTRAVERSION`
+       STR1=`cat /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.EXTRAVERSION`
        STR2=${clst_kextraversion}
        if [ "${STR1}" = "${STR2}" ]
        then 
@@ -156,9 +158,9 @@ then
 fi
 
 CONFIG_MATCH=0
-if [ -e /usr/portage/packages/gk_binaries/${clst_kname}/${clst_kname}-${clst_version_stamp}.CONFIG ]
+if [ -e /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.CONFIG ]
 then
-       STR1=`cat /usr/portage/packages/gk_binaries/${clst_kname}/${clst_kname}-${clst_version_stamp}.CONFIG`
+       STR1=`cat /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.CONFIG`
        STR2=`md5sum /var/tmp/${clst_kname}.config|awk '{print $1}'`
        if [ "${STR1}" = "${STR2}" ]
        then 
@@ -174,17 +176,17 @@ if [ "${USE_MATCH}" = "0" -o "${EXTRAVERSION_MATCH}" = "0" -o "${CONFIG_MATCH}"
 then
        echo "Cleaning up ${clst_kname} kernel install ..."
        echo "This may take some time ..."
-       if [ -d /usr/portage/packages/gk_binaries/${clst_kname}/ ] 
+       if [ -d /tmp/kerncache/${clst_kname}/ ] 
        then
-               rm -r /usr/portage/packages/gk_binaries/${clst_kname}/ || exit 1
+               rm -r /tmp/kerncache/${clst_kname}/ || exit 1
        fi
 fi
 
-mkdir -p /usr/portage/packages/gk_binaries/${clst_kname}
+mkdir -p /tmp/kerncache/${clst_kname}
        
 if [ -n "${clst_KERNCACHE}" ]
 then
-       ROOT=/usr/portage/packages/gk_binaries/${clst_kname} PKGDIR=${PKGDIR} USE="${USE} symlink build" emerge --nodeps -ukb  "${clst_ksource}" || exit 1
+       ROOT=/tmp/kerncache/${clst_kname} PKGDIR=${PKGDIR} USE="${USE} symlink build" emerge --nodeps -ukb  "${clst_ksource}" || exit 1
        KERNELVERSION=`/usr/lib/portage/bin/portageq best_visible / "${clst_ksource}"`
        if [ ! -e /etc/portage/profile/package.provided ]
        then
@@ -197,7 +199,7 @@ then
                fi
        fi
                [ -d /usr/src/linux ] && rm /usr/src/linux
-       ln -s /usr/portage/packages/gk_binaries/${clst_kname}/usr/src/linux /usr/src/linux
+       ln -s /tmp/kerncache/${clst_kname}/usr/src/linux /usr/src/linux
 else
                USE="${USE} symlink build" emerge "${clst_ksource}" || exit 1
 fi
@@ -210,9 +212,9 @@ then
        then
        echo "Setting extraversion to ${clst_kextraversion}"
        sed -i -e "s:EXTRAVERSION \(=.*\):EXTRAVERSION \1-${clst_kextraversion}:" /usr/src/linux/Makefile
-               echo ${clst_kextraversion} > /usr/portage/packages/gk_binaries/${clst_kname}/${clst_kname}-${clst_version_stamp}.EXTRAVERSION
+               echo ${clst_kextraversion} > /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.EXTRAVERSION
        else 
-               touch /usr/portage/packages/gk_binaries/${clst_kname}/${clst_kname}-${clst_version_stamp}.EXTRAVERSION
+               touch /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.EXTRAVERSION
        fi
 fi
 
@@ -227,4 +229,4 @@ clst_fudgeuname=${VER}.${PAT}.${SUB}${EXV}
 /sbin/modules-update --assume-kernel=${clst_fudgeuname}
 
 unset USE
-echo ${clst_kernel_use} > /usr/portage/packages/gk_binaries/${clst_kname}/${clst_kname}-${clst_version_stamp}.USE
+echo ${clst_kernel_use} > /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.USE