Split it between update_seed (do we want to update the seed or not) and update_seed_command (custom command to run when updating).
The later is left for advanced uses / users. If not present, catalyst will update gcc deps.
`$storedir/builds` (example: `src cd2`).
*update_seed*::
-This is an optional setting supported by stage1 that runs an emerge
-command on the seed stage before starting the stage1 build. (example:
-`--update dev-libs/mpfr dev-libs/mpc dev-libs/gmp`)
+This is an optional setting supported by stage1 to tell catalyst if
+it should update the seed stage or not (valid values: `yes no`).
+
+*update_seed_command*::
+This is an optional command to pass to emerge for updating the seed
+stage (example: `--update dev-libs/mpfr dev-libs/mpc dev-libs/gmp`)
+If not specified, catalyst will update gcc deps.
+This setting requires enabling update_seed.
Compilation
~~~~~~~~~~~
def __init__(self,spec,addlargs):
self.required_values=[]
self.valid_values=["chost"]
- self.valid_values.extend(["update_seed"])
+ self.valid_values.extend(["update_seed","update_seed_command"])
generic_stage_target.__init__(self,spec,addlargs)
- self.set_update_seed()
def set_stage_path(self):
self.settings["stage_path"]=normpath(self.settings["chroot_path"]+self.settings["root_path"])
self.mounts.append("/tmp/stage1root/proc")
self.mountmap["/tmp/stage1root/proc"]="/proc"
- def set_update_seed(self):
- if self.settings.has_key("update_seed"):
- self.settings["update_seed_cache"]=self.settings["update_seed"]
-
def register(foo):
foo.update({"stage1":stage1_target})
return foo
clst_root_path=/ setup_pkgmgr
# Update stage3
-if [ -n "${clst_update_seed_cache}" ]; then
- echo "Updating seed stage..."
- clst_root_path=/ run_merge "${clst_update_seed_cache}"
+if [ -n "${clst_update_seed}" ]; then
+ if [ "${clst_update_seed}" == "yes" ]; then
+ echo "Updating seed stage..."
+ if [ -n "${clst_update_command}" ]; then
+ clst_root_path=/ run_merge "${clst_update_command}"
+ else
+ clst_root_path=/ run_merge "--update --deep --newuse --onlydeps gcc"
+ fi
+ else if [ "${clst_update_seed}" != "no" ];
+ echo "Invalid setting for update_seed: ${clst_update_seed}"
+ exit 1
+ fi
else
echo "Skipping seed stage update..."
fi