Пример #1
0
 def set_pkgcache_path(self):
     if "pkgcache_path" in self.settings:
         if type(self.settings["pkgcache_path"]) != types.StringType:
             self.settings["pkgcache_path"] = normpath(
                 string.join(self.settings["pkgcache_path"]))
     else:
         StageBase.set_pkgcache_path(self)
Пример #2
0
    def __init__(self, spec, addlargs):
        self.valid_values = [
            "netboot/kernel/sources", "netboot/kernel/config",
            "netboot/kernel/prebuilt", "netboot/busybox_config",
            "netboot/extra_files", "netboot/packages"
        ]
        self.required_values = []

        try:
            # XXX: This code does nothing because the for loop below is disabled.
            if "netboot/packages" in addlargs:
                if isinstance(addlargs['netboot/packages'], str):
                    _loopy = [addlargs["netboot/packages"]]
                else:
                    _loopy = addlargs["netboot/packages"]

        #	for x in loopy:
        #		self.required_values.append("netboot/packages/"+x+"/files")
        except:
            raise CatalystError("configuration error in netboot/packages.")

        StageBase.__init__(self, spec, addlargs)
        if "netboot/busybox_config" in addlargs:
            file_locate(self.settings, ["netboot/busybox_config"])

        # Custom Kernel Tarball --- use that instead ...

        # unless the user wants specific CFLAGS/CXXFLAGS, let's use -Os

        for envvar in "CFLAGS", "CXXFLAGS":
            if envvar not in os.environ and envvar not in addlargs:
                self.settings[envvar] = "-Os -pipe"
Пример #3
0
 def set_portage_overlay(self):
     StageBase.set_portage_overlay(self)
     if "portage_overlay" in self.settings:
         log.warning(
             'Using an overlay for earlier stages could cause build issues.\n'
             "If you break it, you buy it.  Don't complain to us about it.\n"
             "Don't say we did not warn you.")
Пример #4
0
    def __init__(self, spec, addlargs):
        self.valid_values = [
            "netboot/kernel/sources", "netboot/kernel/config",
            "netboot/kernel/prebuilt", "netboot/busybox_config",
            "netboot/extra_files", "netboot/packages"
        ]
        self.required_values = []

        try:
            if "netboot/packages" in addlargs:
                if type(addlargs["netboot/packages"]) == types.StringType:
                    loopy = [addlargs["netboot/packages"]]
                else:
                    loopy = addlargs["netboot/packages"]

        #	for x in loopy:
        #		self.required_values.append("netboot/packages/"+x+"/files")
        except:
            raise CatalystError("configuration error in netboot/packages.")

        StageBase.__init__(self, spec, addlargs)
        self.set_build_kernel_vars(addlargs)
        if "netboot/busybox_config" in addlargs:
            file_locate(self.settings, ["netboot/busybox_config"])

        # Custom Kernel Tarball --- use that instead ...

        # unless the user wants specific CFLAGS/CXXFLAGS, let's use -Os

        for envvar in "CFLAGS", "CXXFLAGS":
            if envvar not in os.environ and envvar not in addlargs:
                self.settings[envvar] = "-Os -pipe"
Пример #5
0
 def set_packages(self):
     StageBase.set_packages(self)
     if self.settings["spec_prefix"]+"/packages" in self.settings:
         if isinstance(self.settings[self.settings['spec_prefix']+'/packages'], str):
             self.settings[self.settings["spec_prefix"]+"/packages"] = \
                 self.settings[self.settings["spec_prefix"] +
                               "/packages"].split()
Пример #6
0
	def set_portage_overlay(self):
		StageBase.set_portage_overlay(self)
		if "portage_overlay" in self.settings:
			log.warning(
				'Using an overlay for earlier stages could cause build issues.\n'
				"If you break it, you buy it.  Don't complain to us about it.\n"
				"Don't say we did not warn you.")
Пример #7
0
 def set_pkgcache_path(self):
     if "pkgcache_path" in self.settings:
         if not isinstance(self.settings['pkgcache_path'], str):
             self.settings["pkgcache_path"] = normpath(
                 ' '.join(self.settings["pkgcache_path"]))
     else:
         StageBase.set_pkgcache_path(self)
Пример #8
0
	def set_portage_overlay(self):
			StageBase.set_portage_overlay(self)
			if "portage_overlay" in self.settings:
				print "\nWARNING !!!!!"
				print "\tUsing an portage overlay for earlier stages could cause build issues."
				print "\tIf you break it, you buy it. Don't complain to us about it."
				print "\tDont say we did not warn you\n"
Пример #9
0
	def __init__(self,spec,addlargs):
		self.required_values=[
			"boot/kernel"
		]
		self.valid_values=self.required_values[:]
		self.valid_values.extend([
			"netboot2/packages",
			"netboot2/use",
			"netboot2/extra_files",
			"netboot2/overlay",
			"netboot2/busybox_config",
			"netboot2/root_overlay",
			"netboot2/linuxrc"
		])

		try:
			if "netboot2/packages" in addlargs:
				if isinstance(addlargs['netboot2/packages'], str):
					loopy=[addlargs["netboot2/packages"]]
				else:
					loopy=addlargs["netboot2/packages"]

				for x in loopy:
					self.valid_values.append("netboot2/packages/"+x+"/files")
		except:
			raise CatalystError("configuration error in netboot2/packages.")

		StageBase.__init__(self,spec,addlargs)
		self.settings["merge_path"]=normpath("/tmp/image/")
Пример #10
0
	def set_packages(self):
		StageBase.set_packages(self)
		if self.settings["spec_prefix"]+"/packages" in self.settings:
			if isinstance(self.settings[self.settings['spec_prefix']+'/packages'], str):
				self.settings[self.settings["spec_prefix"]+"/packages"] = \
					self.settings[self.settings["spec_prefix"]+"/packages"].split()
		self.settings[self.settings["spec_prefix"]+"/packages"].append("app-misc/livecd-tools")
Пример #11
0
	def __init__(self,spec,addlargs):
		self.required_values=["stage4/packages"]
		self.valid_values=self.required_values[:]
		self.valid_values.extend(["stage4/use", "boot/kernel",
			"stage4/root_overlay", "stage4/fsscript",
			"stage4/gk_mainargs", "splash_theme",
			"portage_overlay", "stage4/rcadd", "stage4/rcdel",
			"stage4/linuxrc", "stage4/unmerge", "stage4/rm", "stage4/empty"])
		StageBase.__init__(self,spec,addlargs)
Пример #12
0
	def __init__(self,spec,addlargs):
		self.required_values=[]
		self.valid_values=[]
		self.valid_values.extend(["embedded/empty","embedded/rm","embedded/unmerge","embedded/fs-prepare","embedded/fs-finish","embedded/mergeroot","embedded/packages","embedded/fs-type","embedded/runscript","boot/kernel","embedded/linuxrc"])
		self.valid_values.extend(["embedded/use"])
		if "embedded/fs-type" in addlargs:
			self.valid_values.append("embedded/fs-ops")

		StageBase.__init__(self,spec,addlargs)
Пример #13
0
 def set_packages(self):
     StageBase.set_packages(self)
     if self.settings["spec_prefix"] + "/packages" in self.settings:
         if type(self.settings[self.settings["spec_prefix"] +
                               "/packages"]) == types.StringType:
             self.settings[self.settings["spec_prefix"]+"/packages"] = \
              self.settings[self.settings["spec_prefix"]+"/packages"].split()
     self.settings[self.settings["spec_prefix"] +
                   "/packages"].append("app-misc/livecd-tools")
Пример #14
0
	def __init__(self,spec,addlargs):
		self.required_values=["stage4/packages"]
		self.valid_values=self.required_values[:]
		self.valid_values.extend(["stage4/use","boot/kernel",\
			"stage4/root_overlay","stage4/fsscript",\
			"stage4/gk_mainargs","splash_theme",\
			"portage_overlay","stage4/rcadd","stage4/rcdel",\
			"stage4/linuxrc","stage4/unmerge","stage4/rm","stage4/empty"])
		StageBase.__init__(self,spec,addlargs)
Пример #15
0
	def set_use(self):
		StageBase.set_use(self)
		if "use" in self.settings:
			self.settings["use"].append("livecd")
			if "BINDIST" in self.settings:
				self.settings["use"].append("bindist")
		else:
			self.settings["use"]=["livecd"]
			if "BINDIST" in self.settings:
				self.settings["use"].append("bindist")
Пример #16
0
    def __init__(self, spec, addlargs):
        if "netboot/packages" in addlargs:
            if isinstance(addlargs['netboot/packages'], str):
                loopy = [addlargs["netboot/packages"]]
            else:
                loopy = addlargs["netboot/packages"]

            for x in loopy:
                self.valid_values |= {"netboot/packages/" + x + "/files"}

        StageBase.__init__(self, spec, addlargs)
        self.settings["merge_path"] = normpath("/tmp/image/")
Пример #17
0
    def __init__(self, spec, addlargs):
        self.required_values = []
        self.valid_values = []
        self.valid_values.extend([
            "embedded/empty", "embedded/rm", "embedded/unmerge",
            "embedded/fs-prepare", "embedded/fs-finish", "embedded/mergeroot",
            "embedded/packages", "embedded/fs-type", "embedded/runscript",
            "boot/kernel", "embedded/linuxrc"
        ])
        self.valid_values.extend(["embedded/use"])
        if "embedded/fs-type" in addlargs:
            self.valid_values.append("embedded/fs-ops")

        StageBase.__init__(self, spec, addlargs)
Пример #18
0
    def __init__(self, spec, addlargs):
        try:
            if "netboot/packages" in addlargs:
                if isinstance(addlargs['netboot/packages'], str):
                    loopy = [addlargs["netboot/packages"]]
                else:
                    loopy = addlargs["netboot/packages"]

                for x in loopy:
                    self.valid_values |= {"netboot/packages/" + x + "/files"}
        except:
            raise CatalystError("configuration error in netboot/packages.")

        StageBase.__init__(self, spec, addlargs)
        self.settings["merge_path"] = normpath("/tmp/image/")
Пример #19
0
	def __init__(self,spec,addlargs):
		self.required_values=["boot/kernel"]

		self.valid_values=[]

		self.valid_values.extend(self.required_values)
		self.valid_values.extend(["livecd/cdtar","livecd/empty","livecd/rm",\
			"livecd/unmerge","livecd/iso","livecd/gk_mainargs","livecd/type",\
			"livecd/readme","livecd/motd","livecd/overlay",\
			"livecd/modblacklist","livecd/splash_theme","livecd/rcadd",\
			"livecd/rcdel","livecd/fsscript","livecd/xinitrc",\
			"livecd/root_overlay","livecd/users","portage_overlay",\
			"livecd/fstype","livecd/fsops","livecd/linuxrc","livecd/bootargs",\
			"gamecd/conf","livecd/xdm","livecd/xsession","livecd/volid","livecd/verify"])

		StageBase.__init__(self,spec,addlargs)
		if "livecd/type" not in self.settings:
			self.settings["livecd/type"] = "generic-livecd"

		file_locate(self.settings, ["cdtar","controller_file"])
Пример #20
0
	def __init__(self,spec,addlargs):
		self.required_values=["boot/kernel"]

		self.valid_values=[]

		self.valid_values.extend(self.required_values)
		self.valid_values.extend(["livecd/cdtar","livecd/empty","livecd/rm",\
			"livecd/unmerge","livecd/iso","livecd/gk_mainargs","livecd/type",\
			"livecd/readme","livecd/motd","livecd/overlay",\
			"livecd/modblacklist","livecd/splash_theme","livecd/rcadd",\
			"livecd/rcdel","livecd/fsscript","livecd/xinitrc",\
			"livecd/root_overlay","livecd/users","portage_overlay",\
			"livecd/fstype","livecd/fsops","livecd/linuxrc","livecd/bootargs",\
			"gamecd/conf","livecd/xdm","livecd/xsession","livecd/volid","livecd/verify"])

		StageBase.__init__(self,spec,addlargs)
		if "livecd/type" not in self.settings:
			self.settings["livecd/type"] = "generic-livecd"

		file_locate(self.settings, ["cdtar","controller_file"])
Пример #21
0
	def __init__(self,spec,addlargs):
		self.required_values=["version_stamp","target","subarch",\
			"rel_type","profile","snapshot","source_subpath"]

		self.valid_values=self.required_values[:]
		self.valid_values.extend(["grp/use"])
		if "grp" not in addlargs:
			raise CatalystError("Required value \"grp\" not specified in spec.")

		self.required_values.extend(["grp"])
		if isinstance(addlargs['grp'], str):
			addlargs["grp"]=[addlargs["grp"]]

		if "grp/use" in addlargs:
			if isinstance(addlargs['grp/use'], str):
				addlargs["grp/use"]=[addlargs["grp/use"]]

		for x in addlargs["grp"]:
			self.required_values.append("grp/"+x+"/packages")
			self.required_values.append("grp/"+x+"/type")

		StageBase.__init__(self,spec,addlargs)
Пример #22
0
    def __init__(self, spec, addlargs):
        self.required_values=["version_stamp","target","subarch",\
         "rel_type","profile","snapshot","source_subpath"]

        self.valid_values = self.required_values[:]
        self.valid_values.extend(["grp/use"])
        if "grp" not in addlargs:
            raise CatalystError(
                "Required value \"grp\" not specified in spec.")

        self.required_values.extend(["grp"])
        if type(addlargs["grp"]) == types.StringType:
            addlargs["grp"] = [addlargs["grp"]]

        if "grp/use" in addlargs:
            if type(addlargs["grp/use"]) == types.StringType:
                addlargs["grp/use"] = [addlargs["grp/use"]]

        for x in addlargs["grp"]:
            self.required_values.append("grp/" + x + "/packages")
            self.required_values.append("grp/" + x + "/type")

        StageBase.__init__(self, spec, addlargs)
Пример #23
0
	def __init__(self,spec,addlargs):
		self.valid_values = [
			"netboot/kernel/sources",
			"netboot/kernel/config",
			"netboot/kernel/prebuilt",

			"netboot/busybox_config",

			"netboot/extra_files",
			"netboot/packages"
		]
		self.required_values=[]

		try:
			# XXX: This code does nothing because the for loop below is disabled.
			if "netboot/packages" in addlargs:
				if isinstance(addlargs['netboot/packages'], str):
					_loopy = [addlargs["netboot/packages"]]
				else:
					_loopy = addlargs["netboot/packages"]

		#	for x in loopy:
		#		self.required_values.append("netboot/packages/"+x+"/files")
		except:
			raise CatalystError("configuration error in netboot/packages.")

		StageBase.__init__(self,spec,addlargs)
		if "netboot/busybox_config" in addlargs:
			file_locate(self.settings, ["netboot/busybox_config"])

		# Custom Kernel Tarball --- use that instead ...

		# unless the user wants specific CFLAGS/CXXFLAGS, let's use -Os

		for envvar in "CFLAGS", "CXXFLAGS":
			if envvar not in os.environ and envvar not in addlargs:
				self.settings[envvar] = "-Os -pipe"
Пример #24
0
	def set_use(self):
		StageBase.set_use(self)
		if "use" in self.settings:
			self.settings["use"].append("bindist")
		else:
			self.settings["use"]=["bindist"]
Пример #25
0
	def __init__(self,spec,addlargs):
		self.required_values=[]
		self.valid_values=["chost"]
		self.valid_values.extend(["update_seed","update_seed_command"])
		StageBase.__init__(self,spec,addlargs)
Пример #26
0
    def __init__(self, spec, addlargs):
        StageBase.__init__(self, spec, addlargs)
        if "livecd/type" not in self.settings:
            self.settings["livecd/type"] = "generic-livecd"

        file_locate(self.settings, ["cdtar", "controller_file"])
Пример #27
0
 def __init__(self, spec, addlargs):
     self.required_values = ["tinderbox/packages"]
     self.valid_values = self.required_values[:]
     self.valid_values.extend(["tinderbox/use"])
     StageBase.__init__(self, spec, addlargs)
Пример #28
0
	def __init__(self,spec,addlargs):
		self.required_values=[]
		self.valid_values=["chost"]
		StageBase.__init__(self,spec,addlargs)
Пример #29
0
 def set_cleanables(self):
     StageBase.set_cleanables(self)
     self.settings["cleanables"].extend([\
     "/usr/share/zoneinfo", self.settings["port_conf"] + "/package*"])
Пример #30
0
 def __init__(self, spec, addlargs):
     self.required_values = []
     self.valid_values = ["chost"]
     self.valid_values.extend(["update_seed", "update_seed_command"])
     StageBase.__init__(self, spec, addlargs)
Пример #31
0
	def set_catalyst_use(self):
		StageBase.set_catalyst_use(self)
		if "catalyst_use" in self.settings:
			self.settings["catalyst_use"].append("livecd")
		else:
			self.settings["catalyst_use"] = ["livecd"]
Пример #32
0
	def __init__(self,spec,addlargs):
		self.required_values=[]
		self.valid_values=[]
		StageBase.__init__(self,spec,addlargs)
Пример #33
0
 def set_cleanables(self):
     StageBase.set_cleanables(self)
Пример #34
0
	def __init__(self,spec,addlargs):
		self.required_values=["tinderbox/packages"]
		self.valid_values=self.required_values[:]
		self.valid_values.extend(["tinderbox/use"])
		StageBase.__init__(self,spec,addlargs)
Пример #35
0
    def set_cleanables(self):
        StageBase.set_cleanables(self)

        # We want to allow stage4's fsscript to generate a default
        # /etc/resolv.conf
        self.settings["cleanables"].remove('/etc/resolv.conf')
Пример #36
0
 def __init__(self, spec, addlargs):
     StageBase.__init__(self, spec, addlargs)
Пример #37
0
 def set_catalyst_use(self):
     StageBase.set_catalyst_use(self)
     if "catalyst_use" in self.settings:
         self.settings["catalyst_use"].append("livecd")
     else:
         self.settings["catalyst_use"] = ["livecd"]
Пример #38
0
 def set_cleanables(self):
     StageBase.set_cleanables(self)
     self.settings["cleanables"].extend([\
     "/usr/share/zoneinfo", "/etc/portage/package*"])
Пример #39
0
 def set_cleanables(self):
     StageBase.set_cleanables(self)
     self.settings["cleanables"].extend([
         self.settings["port_conf"] + "/package*",
     ])
Пример #40
0
	def set_cleanables(self):
		StageBase.set_cleanables(self)
		self.settings["cleanables"].extend([\
		"/usr/share/zoneinfo", self.settings["port_conf"] + "/package*"])
Пример #41
0
 def set_use(self):
     StageBase.set_use(self)
     if "use" in self.settings:
         self.settings["use"].append("bindist")
     else:
         self.settings["use"] = ["bindist"]
Пример #42
0
	def set_pkgcache_path(self):
		if "pkgcache_path" in self.settings:
			if not isinstance(self.settings['pkgcache_path'], str):
				self.settings["pkgcache_path"] = normpath(' '.join(self.settings["pkgcache_path"]))
		else:
			StageBase.set_pkgcache_path(self)
Пример #43
0
	def set_cleanables(self):
		StageBase.set_cleanables(self)