# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
# $Id: $
+ 28 Jul 2008; Chris Gianelloni <wolf31o2@wolf31o2.org>
+ modules/generic_stage_target.py, modules/livecd_stage2_target.py,
+ modules/snapshot_target.py, modules/stage4_target.py,
+ targets/support/bootloader-setup.sh, targets/support/functions.sh,
+ targets/support/kmerge.sh:
+ Removing all deprecated interfaces. We no longer wish to support them and
+ they're not needed. Anyone using a pre-2.x spec file will need to update
+ their specs, anyway.
+
24 Jul 2008; Chris Gianelloni <wolf31o2@wolf31o2.org>
-livecd/files/Getting_Online.txt:
Removing livecd/files/Getting_Online.txt since it was quite outdated.
self.set_iso_volume_id()
self.set_build_kernel_vars()
self.set_fsscript()
- # TODO: Remove archscript/runscript from next major version
- self.set_archscript()
- self.set_runscript()
self.set_install_mask()
self.set_rcadd()
self.set_rcdel()
if not os.path.exists(self.settings["storedir"]+"/builds/"):
os.makedirs(self.settings["storedir"]+"/builds/")
- def set_archscript(self):
- if self.settings.has_key(self.settings["spec_prefix"]+"/archscript"):
- # TODO: remove this warning/code with the next major version
- print "\nWarning!!! "
- print "\t"+self.settings["spec_prefix"]+"/archscript"+\
- " is deprecated and no longer used.\n"
-
- def set_runscript(self):
- if self.settings.has_key(self.settings["spec_prefix"]+"/runscript"):
- # TODO: remove this warning/code with the next major version
- print "\nWarning!!! "
- print "\t"+self.settings["spec_prefix"]+"/runscript"+\
- " is deprecated and no longer used.\n"
-
def set_fsscript(self):
if self.settings.has_key(self.settings["spec_prefix"]+"/fsscript"):
self.settings["fsscript"]=\
del self.settings[self.settings["spec_prefix"]+"/iso"]
def set_fstype(self):
- if self.settings.has_key(self.settings["spec_prefix"]+"/cdfstype"):
- # TODO: remove this warning/code with the next major version
- print "\nWarning!!! "
- print self.settings["spec_prefix"]+"/cdfstype"+\
- " is deprecated and will be removed."
- print "\tUse "+self.settings["spec_prefix"]+"/fstype"+" instead."
- print "\tConverting to "+self.settings["spec_prefix"]+"/fstype"+\
- " internally."
- print "\tContinuing ....\n"
- self.settings["fstype"]=\
- self.settings[self.settings["spec_prefix"]+"/cdfstype"]
- del self.settings[self.settings["spec_prefix"]+"/cdfstype"]
-
if self.settings.has_key(self.settings["spec_prefix"]+"/fstype"):
self.settings["fstype"]=\
self.settings[self.settings["spec_prefix"]+"/fstype"]
if not self.settings.has_key("fstype"):
self.settings["fstype"]="normal"
for x in self.valid_values:
- if x == self.settings["spec_prefix"]+"/fstype"\
- or x == self.settings["spec_prefix"]+"/cdfstype":
+ if x == self.settings["spec_prefix"]+"/fstype":
print "\n"+self.settings["spec_prefix"]+\
"/fstype is being set to the default of \"normal\"\n"
"/packages"])==types.StringType:
addlargs["boot/kernel/"+x+"/packages"]=\
[addlargs["boot/kernel/"+x+"/packages"]]
- # TODO: remove this warning/code with the next major version
- self.valid_values.append("boot/kernel/"+x+"/postconf")
- if addlargs.has_key("boot/kernel/"+x+"/postconf"):
- print "boot/kernel/"+x+"/postconf is deprecated"
- print "\tInternally moving these ebuilds to boot/kernel/"+\
- x+"/packages"
- print "\tPlease move them to boot/kernel/"+x+\
- "/packages in your specfile"
- if type(addlargs["boot/kernel/"+x+\
- "/postconf"])==types.StringType:
- loop2=[addlargs["boot/kernel/"+x+"/postconf"]]
- else:
- loop2=addlargs["boot/kernel/"+x+"/postconf"]
-
- for y in loop2:
- if not addlargs.has_key("boot/kernel/"+x+"/packages"):
- addlargs["boot/kernel/"+x+"/packages"]=[y]
- else:
- addlargs["boot/kernel/"+x+"/packages"].append(y)
def set_build_kernel_vars(self):
- if self.settings.has_key(self.settings["spec_prefix"]+"/devmanager"):
- # TODO: remove this warning/code with the next major version
- print self.settings["spec_prefix"]+\
- "/devmanager is deprecated and will be removed."
- self.settings["devmanager"]=\
- self.settings[self.settings["spec_prefix"]+"/devmanager"]
- del self.settings[self.settings["spec_prefix"]+"/devmanager"]
-
- if self.settings.has_key(self.settings["spec_prefix"]+"/splashtype"):
- # TODO: remove this warning/code with the next major version
- print self.settings["spec_prefix"]+\
- "/splashtype is deprecated and will be removed."
- self.settings["splashtype"]=\
- self.settings[self.settings["spec_prefix"]+"/splashtype"]
- del self.settings[self.settings["spec_prefix"]+"/splashtype"]
-
if self.settings.has_key(self.settings["spec_prefix"]+"/gk_mainargs"):
self.settings["gk_mainargs"]=\
self.settings[self.settings["spec_prefix"]+"/gk_mainargs"]
try:
cmd("/bin/bash "+self.settings["controller_file"]+\
" bootloader " + self.settings["target_path"],\
- "Bootloader runscript failed.",env=self.env)
+ "Bootloader script failed.",env=self.env)
touch(self.settings["autoresume_path"]+"bootloader")
except CatalystError:
self.unbind()
- raise CatalystError,"Runscript aborting due to error."
+ raise CatalystError,"Script aborting due to error."
def livecd_update(self):
if self.settings.has_key("AUTORESUME") \
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/splash_type",\
- "livecd/rcadd","livecd/rcdel","livecd/fsscript","livecd/xinitrc",\
- "livecd/root_overlay","livecd/devmanager","livecd/users",\
- "portage_overlay","livecd/cdfstype","livecd/fstype","livecd/fsops",\
- "livecd/linuxrc","livecd/bootargs","gamecd/conf","livecd/xdm",\
- "livecd/xsession","livecd/volid"])
+ "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"])
generic_stage_target.__init__(self,spec,addlargs)
if not self.settings.has_key("livecd/type"):
self.settings["livecd/type"] = "generic-livecd"
- if self.settings.has_key("livecd/splash_type"):
- print "Using livecd/splash_type is deprecated as we no longer support bootsplash."
-
file_locate(self.settings, ["cdtar","controller_file"])
def set_source_path(self):
class snapshot_target(generic_stage_target):
def __init__(self,myspec,addlargs):
self.required_values=["version_stamp","target"]
- self.valid_values=["version_stamp","target","portdir_overlay"]
+ self.valid_values=["version_stamp","target"]
generic_target.__init__(self,myspec,addlargs)
self.settings=myspec
self.settings["snapshot_path"]=normpath(st+"/snapshots/portage-"+self.settings["version_stamp"]\
+".tar.bz2")
self.settings["tmp_path"]=normpath(st+"/tmp/"+self.settings["target_subpath"])
- if self.settings.has_key("portdir_overlay"):
- print "\nWarning!!!!"
- print "\tThis feature is deprecated no overlay will be added to the snapshot."
- print "\tIf you need an overlay feature please use portage_overlay in the other spec files"
- print "\tOtherwise add your files to the normal snapshot and redigest .. you should know what"
- print "\t\tto do."
- print "\tThis was removed due to digesting issues that are incompatible with portage."
def setup(self):
x=normpath(self.settings["storedir"]+"/snapshots")
self.valid_values=self.required_values[:]
self.valid_values.extend(["stage4/use","boot/kernel",\
"stage4/root_overlay","stage4/fsscript",\
- "stage4/gk_mainargs","splash_theme","splash_type",\
+ "stage4/gk_mainargs","splash_theme",\
"portage_overlay","stage4/rcadd","stage4/rcdel",\
"stage4/linuxrc","stage4/unmerge","stage4/rm","stage4/empty"])
generic_stage_target.__init__(self,spec,addlargs)
extract_cdtar $1
extract_kernels $1/boot
-check_dev_manager
check_bootargs
check_filesystem_type
fi
}
-check_dev_manager(){
- # figure out what device manager we are using and handle it accordingly
- if [ "${clst_livecd_devmanager}" == "devfs" ]
- then
- cmdline_opts="${cmdline_opts} noudev devfs"
- fi
-}
-
check_bootargs(){
# Add any additional options
if [ -n "${clst_livecd_bootargs}" ]
GK_ARGS="${GK_ARGS} --kernel-cc=/usr/lib/ccache/bin/gcc --utils-cc=/usr/lib/ccache/bin/gcc"
fi
- if [ "${clst_devmanager}" == "devfs" ]
- then
- GK_ARGS="${GK_ARGS} --no-udev"
- fi
-
if [ -n "${clst_linuxrc}" ]
then
GK_ARGS="${GK_ARGS} --linuxrc=/tmp/linuxrc"