From 47320888748090c11a23c6f546005b907d75da8b Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Mon, 9 Jul 2012 17:41:44 +0200 Subject: [PATCH] Move class docstrings into classes, add module docstrings to feed catalyst-spec(5) target listing --- modules/embedded_target.py | 19 +++++++++++-------- modules/generic_stage_target.py | 11 ++++------- modules/generic_target.py | 9 +++------ modules/grp_target.py | 7 +++++-- modules/livecd_stage1_target.py | 7 +++++-- modules/livecd_stage2_target.py | 7 +++++-- modules/netboot2_target.py | 7 +++++-- modules/netboot_target.py | 7 +++++-- modules/snapshot_target.py | 6 ++++-- modules/stage1_target.py | 7 +++++-- modules/stage2_target.py | 7 +++++-- modules/stage3_target.py | 7 +++++-- modules/stage4_target.py | 7 +++++-- modules/tinderbox_target.py | 7 +++++-- 14 files changed, 72 insertions(+), 43 deletions(-) diff --git a/modules/embedded_target.py b/modules/embedded_target.py index 2ab8cc5a..6d34a576 100644 --- a/modules/embedded_target.py +++ b/modules/embedded_target.py @@ -1,13 +1,14 @@ - """ -This class works like a 'stage3'. A stage2 tarball is unpacked, but instead -of building a stage3, it emerges a 'system' into another directory -inside the 'stage2' system. This way we do not have to emerge gcc/portage -into the staged system. +Enbedded target, similar to the stage2 target, builds upon a stage2 tarball. -It sounds real complicated but basically it runs -ROOT=/tmp/submerge emerge --blahblah foo bar +A stage2 tarball is unpacked, but instead +of building a stage3, it emerges @system into another directory +inside the stage2 system. This way, we do not have to emerge GCC/portage +into the staged system. +It may sound complicated but basically it runs +ROOT=/tmp/submerge emerge --something foo bar . """ +# NOTE: That^^ docstring has influence catalyst-spec(5) man page generation. import os,string,imp,types,shutil from catalyst_support import * @@ -15,7 +16,9 @@ from generic_stage_target import * from stat import * class embedded_target(generic_stage_target): - + """ + Builder class for embedded target + """ def __init__(self,spec,addlargs): self.required_values=[] self.valid_values=[] diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py index 5947e9a1..c4ef239c 100644 --- a/modules/generic_stage_target.py +++ b/modules/generic_stage_target.py @@ -1,9 +1,3 @@ - -""" -This class does all of the chroot setup, copying of files, etc. It is -the driver class for pretty much everything that Catalyst does. -""" - import os,string,imp,types,shutil from catalyst_support import * from generic_target import * @@ -11,7 +5,10 @@ from stat import * import catalyst_lock class generic_stage_target(generic_target): - + """ + This class does all of the chroot setup, copying of files, etc. It is + the driver class for pretty much everything that Catalyst does. + """ def __init__(self,myspec,addlargs): self.required_values.extend(["version_stamp","target","subarch",\ "rel_type","profile","snapshot","source_subpath"]) diff --git a/modules/generic_target.py b/modules/generic_target.py index 82a4c56b..fe96bd73 100644 --- a/modules/generic_target.py +++ b/modules/generic_target.py @@ -1,12 +1,9 @@ - -""" -The toplevel class for generic_stage_target. This is about as generic as we get. -""" - from catalyst_support import * class generic_target: - + """ + The toplevel class for generic_stage_target. This is about as generic as we get. + """ def __init__(self,myspec,addlargs): addl_arg_parse(myspec,addlargs,self.required_values,self.valid_values) self.settings=myspec diff --git a/modules/grp_target.py b/modules/grp_target.py index b077d9c8..88a91c78 100644 --- a/modules/grp_target.py +++ b/modules/grp_target.py @@ -1,13 +1,16 @@ - """ -The builder class for GRP (Gentoo Reference Platform) builds. +Gentoo Reference Platform (GRP) target """ +# NOTE: That^^ docstring has influence catalyst-spec(5) man page generation. import os,types,glob from catalyst_support import * from generic_stage_target import * class grp_target(generic_stage_target): + """ + The builder class for GRP (Gentoo Reference Platform) builds. + """ def __init__(self,spec,addlargs): self.required_values=["version_stamp","target","subarch",\ "rel_type","profile","snapshot","source_subpath"] diff --git a/modules/livecd_stage1_target.py b/modules/livecd_stage1_target.py index 0d5c97c8..58e2e80e 100644 --- a/modules/livecd_stage1_target.py +++ b/modules/livecd_stage1_target.py @@ -1,12 +1,15 @@ - """ -Builder class for LiveCD stage1. +LiveCD stage1 target """ +# NOTE: That^^ docstring has influence catalyst-spec(5) man page generation. from catalyst_support import * from generic_stage_target import * class livecd_stage1_target(generic_stage_target): + """ + Builder class for LiveCD stage1. + """ def __init__(self,spec,addlargs): self.required_values=["livecd/packages"] self.valid_values=self.required_values[:] diff --git a/modules/livecd_stage2_target.py b/modules/livecd_stage2_target.py index 2b126ed2..11dcc632 100644 --- a/modules/livecd_stage2_target.py +++ b/modules/livecd_stage2_target.py @@ -1,13 +1,16 @@ - """ -Builder class for a LiveCD stage2 build. +LiveCD stage2 target, builds upon previous LiveCD stage1 tarball """ +# NOTE: That^^ docstring has influence catalyst-spec(5) man page generation. import os,string,types,stat,shutil from catalyst_support import * from generic_stage_target import * class livecd_stage2_target(generic_stage_target): + """ + Builder class for a LiveCD stage2 build. + """ def __init__(self,spec,addlargs): self.required_values=["boot/kernel"] diff --git a/modules/netboot2_target.py b/modules/netboot2_target.py index 444f873c..c4d8311c 100644 --- a/modules/netboot2_target.py +++ b/modules/netboot2_target.py @@ -1,13 +1,16 @@ - """ -Builder class for a netboot build, version 2 +netboot target, version 2 """ +# NOTE: That^^ docstring has influence catalyst-spec(5) man page generation. import os,string,types from catalyst_support import * from generic_stage_target import * class netboot2_target(generic_stage_target): + """ + Builder class for a netboot build, version 2 + """ def __init__(self,spec,addlargs): self.required_values=[ "boot/kernel" diff --git a/modules/netboot_target.py b/modules/netboot_target.py index 92c1b045..2f2435e3 100644 --- a/modules/netboot_target.py +++ b/modules/netboot_target.py @@ -1,13 +1,16 @@ - """ -Builder class for a netboot build. +netboot target, version 1 """ +# NOTE: That^^ docstring has influence catalyst-spec(5) man page generation. import os,string,types from catalyst_support import * from generic_stage_target import * class netboot_target(generic_stage_target): + """ + Builder class for a netboot build. + """ def __init__(self,spec,addlargs): self.valid_values = [ "netboot/kernel/sources", diff --git a/modules/snapshot_target.py b/modules/snapshot_target.py index 0609377b..a427b191 100644 --- a/modules/snapshot_target.py +++ b/modules/snapshot_target.py @@ -1,6 +1,5 @@ - """ -Builder class for snapshots. +Snapshot target """ import os @@ -8,6 +7,9 @@ from catalyst_support import * from generic_stage_target import * class snapshot_target(generic_stage_target): + """ + Builder class for snapshots. + """ def __init__(self,myspec,addlargs): self.required_values=["version_stamp","target"] self.valid_values=["version_stamp","target"] diff --git a/modules/stage1_target.py b/modules/stage1_target.py index a6eb4352..32e63344 100644 --- a/modules/stage1_target.py +++ b/modules/stage1_target.py @@ -1,12 +1,15 @@ - """ -Builder class for a stage1 installation tarball build. +stage1 target """ +# NOTE: That^^ docstring has influence catalyst-spec(5) man page generation. from catalyst_support import * from generic_stage_target import * class stage1_target(generic_stage_target): + """ + Builder class for a stage1 installation tarball build. + """ def __init__(self,spec,addlargs): self.required_values=[] self.valid_values=["chost"] diff --git a/modules/stage2_target.py b/modules/stage2_target.py index a5135b25..f5297212 100644 --- a/modules/stage2_target.py +++ b/modules/stage2_target.py @@ -1,12 +1,15 @@ - """ -Builder class for a stage2 installation tarball build. +stage2 target, builds upon previous stage1 tarball """ +# NOTE: That^^ docstring has influence catalyst-spec(5) man page generation. from catalyst_support import * from generic_stage_target import * class stage2_target(generic_stage_target): + """ + Builder class for a stage2 installation tarball build. + """ def __init__(self,spec,addlargs): self.required_values=[] self.valid_values=["chost"] diff --git a/modules/stage3_target.py b/modules/stage3_target.py index 6ebdc495..8c839dfc 100644 --- a/modules/stage3_target.py +++ b/modules/stage3_target.py @@ -1,12 +1,15 @@ - """ -Builder class for a stage3 installation tarball build. +stage3 target, builds upon previous stage2/stage3 tarball """ +# NOTE: That^^ docstring has influence catalyst-spec(5) man page generation. from catalyst_support import * from generic_stage_target import * class stage3_target(generic_stage_target): + """ + Builder class for a stage3 installation tarball build. + """ def __init__(self,spec,addlargs): self.required_values=[] self.valid_values=[] diff --git a/modules/stage4_target.py b/modules/stage4_target.py index cc8e6c02..591f9b20 100644 --- a/modules/stage4_target.py +++ b/modules/stage4_target.py @@ -1,12 +1,15 @@ - """ -Builder class for stage4. +stage4 target, builds upon previous stage3/stage4 tarball """ +# NOTE: That^^ docstring has influence catalyst-spec(5) man page generation. from catalyst_support import * from generic_stage_target import * class stage4_target(generic_stage_target): + """ + Builder class for stage4. + """ def __init__(self,spec,addlargs): self.required_values=["stage4/packages"] self.valid_values=self.required_values[:] diff --git a/modules/tinderbox_target.py b/modules/tinderbox_target.py index 42ad6eb8..9cc1acc9 100644 --- a/modules/tinderbox_target.py +++ b/modules/tinderbox_target.py @@ -1,12 +1,15 @@ - """ -builder class for the tinderbox target +Tinderbox target """ +# NOTE: That^^ docstring has influence catalyst-spec(5) man page generation. from catalyst_support import * from generic_stage_target import * class tinderbox_target(generic_stage_target): + """ + Builder class for the tinderbox target + """ def __init__(self,spec,addlargs): self.required_values=["tinderbox/packages"] self.valid_values=self.required_values[:] -- 2.26.2