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

Collapse All | Expand All

(-)a/catalyst (+4 lines)
Lines 131-136 def parse_config(myconfig): Link Here
131
		print "Icecream compiler cluster support enabled."
131
		print "Icecream compiler cluster support enabled."
132
		conf_values["ICECREAM"]="1"
132
		conf_values["ICECREAM"]="1"
133
133
134
        if "qemu" in string.split(conf_values["options"]):
135
                print "Qemu support enabled."
136
                conf_values["QEMU"]="1"
137
134
	if "kerncache" in string.split(conf_values["options"]):
138
	if "kerncache" in string.split(conf_values["options"]):
135
		print "Kernel cache support enabled."
139
		print "Kernel cache support enabled."
136
		conf_values["KERNCACHE"]="1"
140
		conf_values["KERNCACHE"]="1"
(-)a/modules/catalyst_support.py (+1 lines)
Lines 207-212 valid_config_file_values.append("KERNCACHE") Link Here
207
valid_config_file_values.append("CCACHE")
207
valid_config_file_values.append("CCACHE")
208
valid_config_file_values.append("DISTCC")
208
valid_config_file_values.append("DISTCC")
209
valid_config_file_values.append("ICECREAM")
209
valid_config_file_values.append("ICECREAM")
210
valid_config_file_values.append("QEMU")
210
valid_config_file_values.append("ENVSCRIPT")
211
valid_config_file_values.append("ENVSCRIPT")
211
valid_config_file_values.append("AUTORESUME")
212
valid_config_file_values.append("AUTORESUME")
212
valid_config_file_values.append("FETCH")
213
valid_config_file_values.append("FETCH")
(-)a/modules/generic_stage_target.py (-1 / +41 lines)
Lines 138-143 class generic_stage_target(generic_target): Link Here
138
		self.set_dest_path()
138
		self.set_dest_path()
139
		self.set_stage_path()
139
		self.set_stage_path()
140
		self.set_target_path()
140
		self.set_target_path()
141
                self.set_crossroot_path()
141
142
142
		self.set_controller_file()
143
		self.set_controller_file()
143
		self.set_action_sequence()
144
		self.set_action_sequence()
Lines 439-444 class generic_stage_target(generic_target): Link Here
439
		if not os.path.exists(self.settings["autoresume_path"]):
440
		if not os.path.exists(self.settings["autoresume_path"]):
440
			os.makedirs(self.settings["autoresume_path"],0755)
441
			os.makedirs(self.settings["autoresume_path"],0755)
441
442
443
        def set_crossroot_path(self):
444
                self.settings["crossroot_path"]=normpath(self.settings["storedir"]+\
445
                        "/crossroot/")
446
442
	def set_controller_file(self):
447
	def set_controller_file(self):
443
		self.settings["controller_file"]=normpath(self.settings["sharedir"]+\
448
		self.settings["controller_file"]=normpath(self.settings["sharedir"]+\
444
			"/targets/"+self.settings["target"]+"/"+self.settings["target"]+\
449
			"/targets/"+self.settings["target"]+"/"+self.settings["target"]+\
Lines 458-464 class generic_stage_target(generic_target): Link Here
458
		""" Default action sequence for run method """
463
		""" Default action sequence for run method """
459
		self.settings["action_sequence"]=["unpack","unpack_snapshot",\
464
		self.settings["action_sequence"]=["unpack","unpack_snapshot",\
460
				"config_profile_link","setup_confdir","portage_overlay",\
465
				"config_profile_link","setup_confdir","portage_overlay",\
461
				"base_dirs","bind","chroot_setup","setup_environment",\
466
				"base_dirs","qemu_setup","bind","chroot_setup","setup_environment",\
462
				"run_local","preclean","unbind","clean"]
467
				"run_local","preclean","unbind","clean"]
463
#		if self.settings.has_key("TARBALL") or \
468
#		if self.settings.has_key("TARBALL") or \
464
#			not self.settings.has_key("FETCH"):
469
#			not self.settings.has_key("FETCH"):
Lines 1034-1039 class generic_stage_target(generic_target): Link Here
1034
				"Could not backup /etc/portage/make.conf",env=self.env)
1039
				"Could not backup /etc/portage/make.conf",env=self.env)
1035
			touch(self.settings["autoresume_path"]+"chroot_setup")
1040
			touch(self.settings["autoresume_path"]+"chroot_setup")
1036
1041
1042
        def qemu_setup(self):
1043
		if not self.settings.has_key("QEMU"):
1044
			return
1045
1046
                if self.settings.has_key("AUTORESUME") \
1047
                        and os.path.exists(self.settings["autoresume_path"]+"qemu_setup"):
1048
                        print "Resume point detected, skipping qemu_setup operation..."
1049
                else:
1050
                        print "Setting up qemu..."
1051
1052
                        if self.settings["crosscompile"]:
1053
	                        cmd("mkdir -p "+self.settings["crossroot_path"])
1054
                                cmd('USE="static static-libs -acl -nls -idn -ssl" emerge --oneshot --noreplace --quiet --root='+self.settings["crossroot_path"]+" app-arch/tar app-arch/bzip2 app-arch/gzip sys-apps/findutils sys-apps/sed sys-devel/make",\
1055
                                "Could not build static binaries",env=self.env)
1056
1057
                                cmd("cp /usr/bin/qemu-static-"+self.settings["hostarch"]+" "+self.settings["chroot_path"]+\
1058
                                "usr/bin",\
1059
                                "Could not copy qemu-static-"+self.settings["hostarch"],env=self.env)
1060
                                cmd("cp "+self.settings["sharedir"]+"/targets/support/qemu-binfmt "+self.settings["chroot_path"]+\
1061
                                "usr/bin/qemu-static-"+self.settings["hostarch"]+"-binfmt",\
1062
                                "Could not copy qemu-binfmt",env=self.env)
1063
1064
                        touch(self.settings["autoresume_path"]+"qemu_setup")
1065
1066
		self.mounts.append("/crossroot")
1067
		self.mountmap["/crossroot"]=\
1068
			self.settings["crossroot_path"]
1069
1037
	def fsscript(self):
1070
	def fsscript(self):
1038
		if self.settings.has_key("AUTORESUME") \
1071
		if self.settings.has_key("AUTORESUME") \
1039
			and os.path.exists(self.settings["autoresume_path"]+"fsscript"):
1072
			and os.path.exists(self.settings["autoresume_path"]+"fsscript"):
Lines 1090-1095 class generic_stage_target(generic_target): Link Here
1090
				"clean script failed.",env=self.env)
1123
				"clean script failed.",env=self.env)
1091
			touch(self.settings["autoresume_path"]+"clean")
1124
			touch(self.settings["autoresume_path"]+"clean")
1092
1125
1126
		""" Clean up qemu """
1127
		if self.settings.has_key("QEMU") and self.settings["crosscompile"]:
1128
                        cmd("rm -f "+self.settings["stage_path"]+"/usr/bin/qemu-static-"+self.settings["hostarch"],\
1129
                        "Could not remove qemu-static-"+self.settings["hostarch"],env=self.env)
1130
                        cmd("rm -f "+self.settings["stage_path"]+"/usr/bin/qemu-static-"+self.settings["hostarch"]+"-binfmt",\
1131
                        "Could not remove qemu-static-"+self.settings["hostarch"]+"-binfmt",env=self.env)
1132
1093
	def empty(self):
1133
	def empty(self):
1094
		if self.settings.has_key("AUTORESUME") \
1134
		if self.settings.has_key("AUTORESUME") \
1095
			and os.path.exists(self.settings["autoresume_path"]+"empty"):
1135
			and os.path.exists(self.settings["autoresume_path"]+"empty"):
(-)a/modules/stage4_target.py (-1 / +1 lines)
Lines 26-32 class stage4_target(generic_stage_target): Link Here
26
	def set_action_sequence(self):
26
	def set_action_sequence(self):
27
		self.settings["action_sequence"]=["unpack","unpack_snapshot",\
27
		self.settings["action_sequence"]=["unpack","unpack_snapshot",\
28
					"config_profile_link","setup_confdir","portage_overlay",\
28
					"config_profile_link","setup_confdir","portage_overlay",\
29
					"bind","chroot_setup","setup_environment","build_packages",\
29
					"qemu_setup","bind","chroot_setup","setup_environment","build_packages",\
30
					"build_kernel","bootloader","root_overlay","fsscript",\
30
					"build_kernel","bootloader","root_overlay","fsscript",\
31
					"preclean","rcupdate","unmerge","unbind","remove","empty",\
31
					"preclean","rcupdate","unmerge","unbind","remove","empty",\
32
					"clean"]
32
					"clean"]

Return to bug 431214