Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 200106 Details for
Bug 280257
Enhancement: mount tmpfs on /var/tmp/portage
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to add an option for mounting a tmpfs
tmpfs.diff (text/plain), 3.19 KB, created by
Tom Stellard
on 2009-08-04 05:09:15 UTC
(
hide
)
Description:
Patch to add an option for mounting a tmpfs
Filename:
MIME Type:
Creator:
Tom Stellard
Created:
2009-08-04 05:09:15 UTC
Size:
3.19 KB
patch
obsolete
>diff --git a/catalyst b/catalyst >index 82b4dc9..71a842e 100755 >--- a/catalyst >+++ b/catalyst >@@ -61,7 +61,7 @@ def parse_config(myconfig): > "sharedir":"/usr/share/catalyst","distdir":"/usr/portage/distfiles",\ > "portdir":"/usr/portage","options":"",\ > "snapshot_cache":"/var/tmp/catalyst/snapshot_cache",\ >- "hash_function":"crc32"} >+ "hash_function":"crc32","tmpfs_opts":""} > > # first, try the one passed (presumably from the cmdline) > if myconfig: >@@ -152,6 +152,10 @@ def parse_config(myconfig): > print "Use of metadata_overlay module for portage enabled." > conf_values["METADATA_OVERLAY"]="1" > >+ if "tmpfs" in conf_values["options"].split(): >+ print "Use of tmpfs enabled." >+ conf_values["TMPFS"]="1" >+ > # if "tarball" in string.split(conf_values["options"]): > # print "Tarball creation enabled." > # conf_values["TARBALL"]="1" >diff --git a/files/catalyst.conf b/files/catalyst.conf >index b4e2385..855ce23 100644 >--- a/files/catalyst.conf >+++ b/files/catalyst.conf >@@ -58,6 +58,9 @@ hash_function="crc32" > # snapcache = cache the snapshot so that it can be bind-mounted into the chroot. > # WARNING: moving parts of the portage tree from within fsscript *will* break > # your cache. The cache is unlinked before any empty or rm processing, though. >+# tmpfs = Mount tmpfs on /var/tmp/portage to speed up builds. You can set the >+# size of the tmpfs by using tmpfs_opts. If tmpfs_opts is not set the >+# tmpfs will be the default size. EX: tmpfs_opts="size=1G,nr_inodes=10k" > # > # (These options can be used together) > options="autoresume kerncache metadata_overlay pkgcache seedcache snapcache" >diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py >index 92ec381..47d9eed 100644 >--- a/modules/generic_stage_target.py >+++ b/modules/generic_stage_target.py >@@ -19,7 +19,7 @@ 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","cbuild","hostuse","portage_overlay",\ >- "distcc_hosts","makeopts","pkgcache_path","kerncache_path"]) >+ "distcc_hosts","makeopts","pkgcache_path","kerncache_path","tmpfs_opts"]) > > self.set_valid_build_kernel_vars(addlargs) > generic_target.__init__(self,myspec,addlargs) >@@ -229,6 +229,10 @@ class generic_stage_target(generic_target): > self.mountmap["/var/cache/icecream"]="/var/cache/icecream" > self.env["PATH"]="/usr/lib/icecc/bin:"+self.env["PATH"] > >+ if self.settings.has_key("TMPFS"): >+ self.mounts.append("/var/tmp/portage") >+ self.mountmap["/var/tmp/portage"]="tmpfs" >+ > def override_cbuild(self): > if self.makeconf.has_key("CBUILD"): > self.settings["CBUILD"]=self.makeconf["CBUILD"] >@@ -882,6 +886,13 @@ class generic_stage_target(generic_target): > else: > retval=os.system("mount_nullfs "+src+" "+\ > self.settings["chroot_path"]+x) >+ elif src == "tmpfs": >+ tmpfs_o="" >+ if self.settings.has_key("tmpfs_opts"): >+ tmpfs_o="-o "+self.settings["tmpfs_opts"] >+ retval=os.system("mount " + tmpfs_o +\ >+ " -t tmpfs catalyst_tmpfs "+\ >+ self.settings["chroot_path"]+x) > else: > retval=os.system("mount --bind "+src+" "+\ > self.settings["chroot_path"]+x)
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 280257
:
200106
|
200473