Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 280257 | Differences between
and this patch

Collapse All | Expand All

(-)a/catalyst (-1 / +5 lines)
Lines 61-67 def parse_config(myconfig): Link Here
61
		"sharedir":"/usr/share/catalyst","distdir":"/usr/portage/distfiles",\
61
		"sharedir":"/usr/share/catalyst","distdir":"/usr/portage/distfiles",\
62
		"portdir":"/usr/portage","options":"",\
62
		"portdir":"/usr/portage","options":"",\
63
		"snapshot_cache":"/var/tmp/catalyst/snapshot_cache",\
63
		"snapshot_cache":"/var/tmp/catalyst/snapshot_cache",\
64
		"hash_function":"crc32"}
64
		"hash_function":"crc32","tmpfs_opts":""}
65
		
65
		
66
	# first, try the one passed (presumably from the cmdline)
66
	# first, try the one passed (presumably from the cmdline)
67
	if myconfig:
67
	if myconfig:
Lines 152-157 def parse_config(myconfig): Link Here
152
		print "Use of metadata_overlay module for portage enabled."
152
		print "Use of metadata_overlay module for portage enabled."
153
		conf_values["METADATA_OVERLAY"]="1"
153
		conf_values["METADATA_OVERLAY"]="1"
154
154
155
	if "tmpfs" in conf_values["options"].split():
156
		print "Use of tmpfs enabled."
157
		conf_values["TMPFS"]="1"
158
155
#	if "tarball" in string.split(conf_values["options"]):
159
#	if "tarball" in string.split(conf_values["options"]):
156
#		print "Tarball creation enabled."
160
#		print "Tarball creation enabled."
157
#		conf_values["TARBALL"]="1"
161
#		conf_values["TARBALL"]="1"
(-)a/files/catalyst.conf (+3 lines)
Lines 58-63 hash_function="crc32" Link Here
58
# snapcache = cache the snapshot so that it can be bind-mounted into the chroot.
58
# snapcache = cache the snapshot so that it can be bind-mounted into the chroot.
59
#	WARNING: moving parts of the portage tree from within fsscript *will* break
59
#	WARNING: moving parts of the portage tree from within fsscript *will* break
60
#	your cache. The cache is unlinked before any empty or rm processing, though.
60
#	your cache. The cache is unlinked before any empty or rm processing, though.
61
# tmpfs = Mount tmpfs on /var/tmp/portage to speed up builds.  You can set the
62
# 	size of the tmpfs by using tmpfs_opts.  If tmpfs_opts is not set the
63
# 	tmpfs will be the default size.  EX: tmpfs_opts="size=1G,nr_inodes=10k"
61
#
64
#
62
# (These options can be used together)
65
# (These options can be used together)
63
options="autoresume kerncache metadata_overlay pkgcache seedcache snapcache"
66
options="autoresume kerncache metadata_overlay pkgcache seedcache snapcache"
(-)a/modules/generic_stage_target.py (-3 / +14 lines)
Lines 19-25 class generic_stage_target(generic_target): Link Here
19
		self.valid_values.extend(["version_stamp","target","subarch",\
19
		self.valid_values.extend(["version_stamp","target","subarch",\
20
			"rel_type","profile","snapshot","source_subpath","portage_confdir",\
20
			"rel_type","profile","snapshot","source_subpath","portage_confdir",\
21
			"cflags","cxxflags","ldflags","cbuild","hostuse","portage_overlay",\
21
			"cflags","cxxflags","ldflags","cbuild","hostuse","portage_overlay",\
22
			"distcc_hosts","makeopts","pkgcache_path","kerncache_path"])
22
			"distcc_hosts","makeopts","pkgcache_path","kerncache_path","tmpfs_opts"])
23
23
24
		self.set_valid_build_kernel_vars(addlargs)
24
		self.set_valid_build_kernel_vars(addlargs)
25
		generic_target.__init__(self,myspec,addlargs)
25
		generic_target.__init__(self,myspec,addlargs)
Lines 229-234 class generic_stage_target(generic_target): Link Here
229
			self.mountmap["/var/cache/icecream"]="/var/cache/icecream"
229
			self.mountmap["/var/cache/icecream"]="/var/cache/icecream"
230
			self.env["PATH"]="/usr/lib/icecc/bin:"+self.env["PATH"]
230
			self.env["PATH"]="/usr/lib/icecc/bin:"+self.env["PATH"]
231
231
232
		if self.settings.has_key("TMPFS"):
233
			self.mounts.append("/var/tmp/portage")
234
			self.mountmap["/var/tmp/portage"]="tmpfs"
235
232
	def override_cbuild(self):
236
	def override_cbuild(self):
233
		if self.makeconf.has_key("CBUILD"):
237
		if self.makeconf.has_key("CBUILD"):
234
			self.settings["CBUILD"]=self.makeconf["CBUILD"]
238
			self.settings["CBUILD"]=self.makeconf["CBUILD"]
Lines 866-878 class generic_stage_target(generic_target): Link Here
866
870
867
	def bind(self):
871
	def bind(self):
868
		for x in self.mounts: 
872
		for x in self.mounts: 
873
			src=self.mountmap[x]
869
			if not os.path.exists(self.settings["chroot_path"]+x):
874
			if not os.path.exists(self.settings["chroot_path"]+x):
870
				os.makedirs(self.settings["chroot_path"]+x,0755)
875
				os.makedirs(self.settings["chroot_path"]+x,0755)
871
876
872
			if not os.path.exists(self.mountmap[x]):
877
			if (not os.path.exists(src)) and src != "tmpfs":
873
				os.makedirs(self.mountmap[x],0755)
878
				os.makedirs(self.mountmap[x],0755)
874
879
875
			src=self.mountmap[x]
876
			if self.settings.has_key("SNAPCACHE") and x == "/usr/portage":
880
			if self.settings.has_key("SNAPCACHE") and x == "/usr/portage":
877
				self.snapshot_lock_object.read_lock()
881
				self.snapshot_lock_object.read_lock()
878
			if os.uname()[0] == "FreeBSD":
882
			if os.uname()[0] == "FreeBSD":
Lines 882-887 class generic_stage_target(generic_target): Link Here
882
				else:
886
				else:
883
					retval=os.system("mount_nullfs "+src+" "+\
887
					retval=os.system("mount_nullfs "+src+" "+\
884
						self.settings["chroot_path"]+x)
888
						self.settings["chroot_path"]+x)
889
			elif src == "tmpfs":
890
				tmpfs_o=""
891
				if self.settings.has_key("tmpfs_opts"):
892
					tmpfs_o="-o "+self.settings["tmpfs_opts"]
893
				retval=os.system("mount " + tmpfs_o +\
894
					" -t tmpfs catalyst_tmpfs "+\
895
					self.settings["chroot_path"]+x)
885
			else:
896
			else:
886
				retval=os.system("mount --bind "+src+" "+\
897
				retval=os.system("mount --bind "+src+" "+\
887
					self.settings["chroot_path"]+x)
898
					self.settings["chroot_path"]+x)

Return to bug 280257