even more weirdness
authorDaniel Robbins <drobbins@gentoo.org>
Sat, 25 Oct 2003 04:45:31 +0000 (04:45 +0000)
committerDaniel Robbins <drobbins@gentoo.org>
Sat, 25 Oct 2003 04:45:31 +0000 (04:45 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@21 d1e1f19c-881f-0410-ab34-b69fee027534

modules/builder.py [new file with mode: 0644]
modules/targets.py [new file with mode: 0644]

diff --git a/modules/builder.py b/modules/builder.py
new file mode 100644 (file)
index 0000000..c6b8e24
--- /dev/null
@@ -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 (file)
index 0000000..d263a8d
--- /dev/null
@@ -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
+