# Copyright 2002-2009 Gentoo Foundation; 2008-2009 Various authors (see AUTHORS)
# Distributed under the GPL v2
+ 14 Jan 2009; Andrew Gaffney <agaffney@gentoo.org>
+ modules/catalyst/arch/alpha.py, modules/catalyst/arch/amd64.py,
+ modules/catalyst/arch/arm.py, modules/catalyst/arch/hppa.py,
+ modules/catalyst/arch/ia64.py, modules/catalyst/arch/mips.py,
+ modules/catalyst/arch/powerpc.py, modules/catalyst/arch/s390.py,
+ modules/catalyst/arch/sh.py, modules/catalyst/arch/sparc.py,
+ modules/catalyst/arch/x86.py, modules/catalyst/lock.py,
+ modules/catalyst/target/generic.py,
+ modules/catalyst/target/generic_stage.py:
+ Fix up a few runtime errors
+
13 Jan 2009; Andrew Gaffney <agaffney@gentoo.org>
+modules/catalyst/target/system.py, +targets/system/system-chroot.sh,
+targets/system/system-controller.sh,
self.settings["CHOST"]="alphaev67-unknown-linux-gnu"
self.settings["HOSTUSE"]=["ev6"]
-__subarch_map = {
+_subarch_map = {
"alpha": arch_alpha,
"ev4": arch_ev4,
"ev45": arch_ev45,
"ev67": arch_ev67
}
-__machine_map = ("alpha", )
+_machine_map = ("alpha", )
self.settings["CHOST"]="x86_64-pc-linux-gnu"
self.settings["HOSTUSE"]=["mmx","sse","sse2","3dnow"]
-__subarch_map = {
+_subarch_map = {
"amd64" : arch_amd64,
"k8" : arch_k8,
"opteron" : arch_k8,
# "barcelona" : arch_amdfam10
}
-__machine_map = ("x86_64","amd64","nocona")
+_machine_map = ("x86_64","amd64","nocona")
self.settings["CFLAGS"]+=" -mcpu=xscale"
self.settings["CHOST"]="armv5b-unknown-linux-gnu"
-__subarch_map = {
+_subarch_map = {
"arm" : arch_arm,
"armv4l" : arch_armv4l,
"armeb" : arch_armeb,
"armv5b" : arch_armv5b
}
-__machine_map = ("arm", "armv4l", "armeb", "armv5b", "armv5tel")
+_machine_map = ("arm", "armv4l", "armeb", "armv5b", "armv5tel")
self.settings["CFLAGS"]+=" -march=2.0"
self.settings["CHOST"]="hppa2.0-unknown-linux-gnu"
-__subarch_map = {
+_subarch_map = {
"hppa": arch_hppa,
"hppa1.1": arch_hppa1_1,
"hppa2.0": arch_hppa2_0
}
-__machine_map = ("parisc","parisc64","hppa","hppa64")
+_machine_map = ("parisc","parisc64","hppa","hppa64")
self.settings["CFLAGS"]="-O2 -pipe"
self.settings["CHOST"]="ia64-unknown-linux-gnu"
-__subarch_map = {
+_subarch_map = {
"ia64": arch_ia64
}
-__machine_map = ("ia64", )
+_machine_map = ("ia64", )
arch_mips4_n32.__init__(self,myspec)
self.settings["HOSTUSE"]=["ip30","n32"]
-__subarch_map = {
+_subarch_map = {
"cobalt" : arch_cobalt,
"cobalt_n32" : arch_cobalt_n32,
"ip27" : arch_ip27,
"loongson" : arch_mipsel3,
}
-__machine_map = ("mips","mips64")
+_machine_map = ("mips","mips64")
self.settings["CFLAGS"]="-O2 -pipe -mcpu=power6 -mtune=power6"
self.settings["HOSTUSE"]=["altivec","ibm"]
-__subarch_map = {
+_subarch_map = {
"970" : arch_970,
"cell" : arch_cell,
"g3" : arch_g3,
"ppc64" : arch_ppc64
}
-__machine_map = ("ppc","ppc64","powerpc","powerpc64")
+_machine_map = ("ppc","ppc64","powerpc","powerpc64")
self.settings["CFLAGS"]="-O2 -pipe"
self.settings["CHOST"]="s390x-ibm-linux-gnu"
-__subarch_map = {
+_subarch_map = {
"s390": arch_s390,
"s390x": arch_s390x
}
-__machine_map = ("s390", "s390x")
+_machine_map = ("s390", "s390x")
self.settings["CFLAGS"]="-O2 -m4 -pipe"
self.settings["CHOST"]="sh4eb-unknown-linux-gnu"
-__subarch_map = {
+_subarch_map = {
"sh" :arch_sh,
"sh2" :arch_sh2,
"sh3" :arch_sh3,
"sh4eb" :arch_sh4eb
}
-__machine_map = ("sh2","sh3","sh4","sh2eb","sh3eb","sh4eb")
+_machine_map = ("sh2","sh3","sh4","sh2eb","sh3eb","sh4eb")
self.settings["CFLAGS"]="-O2 -mcpu=ultrasparc -pipe"
self.settings["CHOST"]="sparc-unknown-linux-gnu"
-__subarch_map = {
+_subarch_map = {
"sparc" : arch_sparc,
"sparc64" : arch_sparc64
}
-__machine_map = ("sparc","sparc64")
+_machine_map = ("sparc","sparc64")
self.settings["CHOST"]="i686-pc-linux-gnu"
self.settings["HOSTUSE"]=["mmx","3dnow","sse"]
-__subarch_map = {
+_subarch_map = {
"x86" : arch_x86,
"i386" : arch_i386,
"i486" : arch_i486,
"athlon-mp" : arch_athlon_xp
}
-__machine_map = ('i386', 'i486', 'i586', 'i686')
+_machine_map = ('i386', 'i486', 'i586', 'i686')
import stat
import sys
import time
+from os.path import normpath
from catalyst.output import *
def writemsg(mystr):
self.settings = self.config.get_spec().get_values()
self.settings.update(self.config.get_conf())
+ self.required_values = []
+ self.valid_values = []
+
self.env={}
self.env["PATH"]="/bin:/sbin:/usr/bin:/usr/sbin"
"cflags","cxxflags","ldflags","cbuild","hostuse","portage_overlay",\
"distcc_hosts","makeopts","pkgcache_path","kerncache_path"])
- self.set_valid_build_kernel_vars(addlargs)
+ self.set_valid_build_kernel_vars()
"""
The semantics of subarchmap and machinemap changed a bit in 2.0.3 to
arches = catalyst.arch.get_arches()
for x in arches:
- self.subarchmap.update(arches[x].__subarch_map)
- for machine in arches[x].__machine_map:
- machinemap[machine] = arches[x]
- for subarch in arches[x].__subarch_map:
- machinemap[subarch] = arches[x]
+ self.subarchmap.update(arches[x]._subarch_map)
+ for machine in arches[x]._machine_map:
+ machinemap[machine] = x
+ for subarch in arches[x]._subarch_map:
+ machinemap[subarch] = x
if "chost" in self.settings:
hostmachine = self.settings["chost"].split("-")[0]
""" ROOT= variable for emerges """
self.settings["root_path"]="/"
- def set_valid_build_kernel_vars(self,addlargs):
- if "boot/kernel" in addlargs:
- if type(addlargs["boot/kernel"])==types.StringType:
- loopy=[addlargs["boot/kernel"]]
+ def set_valid_build_kernel_vars(self):
+ if "boot/kernel" in self.settings:
+ if type(self.settings["boot/kernel"])==types.StringType:
+ loopy=[self.settings["boot/kernel"]]
else:
- loopy=addlargs["boot/kernel"]
+ loopy=self.settings["boot/kernel"]
for x in loopy:
self.valid_values.append("boot/kernel/"+x+"/aliases")
self.valid_values.append("boot/kernel/"+x+"/softlevel")
self.valid_values.append("boot/kernel/"+x+"/use")
self.valid_values.append("boot/kernel/"+x+"/packages")
- if "boot/kernel/"+x+"/packages" in addlargs:
- if type(addlargs["boot/kernel/"+x+\
+ if "boot/kernel/"+x+"/packages" in self.settings:
+ if type(self.settings["boot/kernel/"+x+\
"/packages"])==types.StringType:
- addlargs["boot/kernel/"+x+"/packages"]=\
- [addlargs["boot/kernel/"+x+"/packages"]]
+ self.settings["boot/kernel/"+x+"/packages"]=\
+ [self.settings["boot/kernel/"+x+"/packages"]]
def kill_chroot_pids(self):
msg("Checking for processes running in chroot and killing them.")
msg("--- Running action sequence: " + x)
sys.stdout.flush()
try:
- apply(getattr(self,x))
+ func = getattr(self, x)
+ func()
except:
self.mount_safety_check()
raise