From a4d2ec047614a4bb60e6fee74a17e4bd7578fc4c Mon Sep 17 00:00:00 2001 From: Daniel Robbins Date: Sat, 25 Oct 2003 04:45:31 +0000 Subject: [PATCH] even more weirdness git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@21 d1e1f19c-881f-0410-ab34-b69fee027534 --- modules/builder.py | 14 ++++++++++ modules/targets.py | 66 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 modules/builder.py create mode 100644 modules/targets.py diff --git a/modules/builder.py b/modules/builder.py new file mode 100644 index 00000000..c6b8e24f --- /dev/null +++ b/modules/builder.py @@ -0,0 +1,14 @@ +class generic: + def __init__(self): + self.settings={} + def mount_safety_check(self): + """make sure that no bind mounts exist in chrootdir (to use before + cleaning the directory, to make sure we don't wipe the contents of + a bind mount""" + pass + def mount_all(self): + """do all bind mounts""" + pass + def umount_all(self): + """unmount all bind mounts""" + pass diff --git a/modules/targets.py b/modules/targets.py new file mode 100644 index 00000000..d263a8db --- /dev/null +++ b/modules/targets.py @@ -0,0 +1,66 @@ + +""" +local variables from spec: + +version_stamp 20031016 user (from spec) +target stage3 user (from spec) +subarch pentium4 user (from spec) +rel_type default user (from spec) (was BUILDTYPE) +rel_version 1.4 user (from spec) (was MAINVERSION) +snapshot 20031016 user (from spec) +source_subpath default-x86-1.4/stage2-pentium4-20031016 user (from spec) +""" + +class generic_target: + def __init__(self): + pass + def run_prep(self): + """copy scripts into location, generate files containing build + commands (for GRP), etc.""" + def list_mounts(self): + """specify needed mounts and their locations.""" + def run_script(self): + """specify script to run.""" + def spec_require(self): + """return list of definitions required from spec""" + +class generic_stage_target(generic_target): + def spec_require(self): + return ["version_stamp","subarch","rel_type","rel_version","snapshot","source_subpath"] + +class snapshot_target(generic_target): + def __init__(self): + pass + def spec_require(self): + return ["snapshot"] + +class stage1_target(generic_stage_target): + def __init__(self): + generic_target.__init__(self) + pass + +class stage2_target(generic_stage_target): + def __init__(self): + generic_target.__init__(self) + pass + +class stage3_target(generic_stage_target): + def __init__(self): + generic_target.__init__(self) + pass + +class grp_target(generic_stage_target): + def __init__(self): + generic_target.__init__(self) + pass + +class livecd_target(generic_stage_target): + def __init__(self): + generic_target.__init__(self) + pass + +def register(foo): + foo.update({"stage1":stage1_target,"stage2":stage2_target,"stage3":stage3_target, + "grp":grp_target,"livecd":livecd_target,"snapshot":snapshot_target}) + return foo + -- 2.26.2