From: Brian Dolbec Date: Sat, 12 Jan 2013 07:32:41 +0000 (-0800) Subject: Move catalyst_support, builder, catalyst_lock out of modules, into the catalyst names... X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=030d4bd354a1d630f79224eb875dbbc40fa503d4;p=catalyst.git Move catalyst_support, builder, catalyst_lock out of modules, into the catalyst namespace. --- diff --git a/catalyst/arch/alpha.py b/catalyst/arch/alpha.py index f0fc95a5..72480203 100644 --- a/catalyst/arch/alpha.py +++ b/catalyst/arch/alpha.py @@ -1,6 +1,8 @@ -import builder,os -from catalyst_support import * +import os + +from catalyst import builder +from catalyst.support import * class generic_alpha(builder.generic): "abstract base class for all alpha builders" diff --git a/catalyst/arch/amd64.py b/catalyst/arch/amd64.py index 262b55a9..13e75632 100644 --- a/catalyst/arch/amd64.py +++ b/catalyst/arch/amd64.py @@ -1,5 +1,5 @@ -import builder +from catalyst import builder class generic_amd64(builder.generic): "abstract base class for all amd64 builders" diff --git a/catalyst/arch/arm.py b/catalyst/arch/arm.py index 2de39429..8f207fff 100644 --- a/catalyst/arch/arm.py +++ b/catalyst/arch/arm.py @@ -1,6 +1,8 @@ -import builder,os -from catalyst_support import * +import os + +from catalyst import builder +from catalyst.support import * class generic_arm(builder.generic): "Abstract base class for all arm (little endian) builders" diff --git a/catalyst/arch/hppa.py b/catalyst/arch/hppa.py index f804398f..3aac9b6a 100644 --- a/catalyst/arch/hppa.py +++ b/catalyst/arch/hppa.py @@ -1,6 +1,8 @@ -import builder,os -from catalyst_support import * +import os + +from catalyst import builder +from catalyst.support import * class generic_hppa(builder.generic): "Abstract base class for all hppa builders" diff --git a/catalyst/arch/ia64.py b/catalyst/arch/ia64.py index 825af704..40030853 100644 --- a/catalyst/arch/ia64.py +++ b/catalyst/arch/ia64.py @@ -1,6 +1,8 @@ -import builder,os -from catalyst_support import * +import os + +from catalyst import builder +from catalyst.support import * class arch_ia64(builder.generic): "builder class for ia64" diff --git a/catalyst/arch/mips.py b/catalyst/arch/mips.py index b3730fa1..7cce3921 100644 --- a/catalyst/arch/mips.py +++ b/catalyst/arch/mips.py @@ -1,6 +1,8 @@ -import builder,os -from catalyst_support import * +import os + +from catalyst import builder +from catalyst.support import * class generic_mips(builder.generic): "Abstract base class for all mips builders [Big-endian]" diff --git a/catalyst/arch/powerpc.py b/catalyst/arch/powerpc.py index e9f611bf..6cec5807 100644 --- a/catalyst/arch/powerpc.py +++ b/catalyst/arch/powerpc.py @@ -1,6 +1,8 @@ -import os,builder -from catalyst_support import * +import os + +from catalyst import builder +from catalyst.support import * class generic_ppc(builder.generic): "abstract base class for all 32-bit powerpc builders" diff --git a/catalyst/arch/s390.py b/catalyst/arch/s390.py index bf22f668..c49e0b76 100644 --- a/catalyst/arch/s390.py +++ b/catalyst/arch/s390.py @@ -1,6 +1,8 @@ -import builder,os -from catalyst_support import * +import os + +from catalyst import builder +from catalyst.support import * class generic_s390(builder.generic): "abstract base class for all s390 builders" diff --git a/catalyst/arch/sh.py b/catalyst/arch/sh.py index 2fc95315..1fa1b0b6 100644 --- a/catalyst/arch/sh.py +++ b/catalyst/arch/sh.py @@ -1,6 +1,8 @@ -import builder,os -from catalyst_support import * +import os + +from catalyst import builder +from catalyst.support import * class generic_sh(builder.generic): "Abstract base class for all sh builders [Little-endian]" diff --git a/catalyst/arch/sparc.py b/catalyst/arch/sparc.py index 5eb5344c..28895287 100644 --- a/catalyst/arch/sparc.py +++ b/catalyst/arch/sparc.py @@ -1,6 +1,8 @@ -import builder,os -from catalyst_support import * +import os + +from catalyst import builder +from catalyst.support import * class generic_sparc(builder.generic): "abstract base class for all sparc builders" diff --git a/catalyst/arch/x86.py b/catalyst/arch/x86.py index 0391b792..c8d19118 100644 --- a/catalyst/arch/x86.py +++ b/catalyst/arch/x86.py @@ -1,6 +1,8 @@ -import builder,os -from catalyst_support import * +import os + +from catalyst import builder +from catalyst.support import * class generic_x86(builder.generic): "abstract base class for all x86 builders" diff --git a/catalyst/modules/builder.py b/catalyst/builder.py similarity index 100% rename from catalyst/modules/builder.py rename to catalyst/builder.py diff --git a/catalyst/config.py b/catalyst/config.py index 726bf747..460bbd51 100644 --- a/catalyst/config.py +++ b/catalyst/config.py @@ -1,5 +1,6 @@ + import re -from modules.catalyst_support import * +from catalyst.support import * class ParserBase: diff --git a/catalyst/modules/catalyst_lock.py b/catalyst/lock.py similarity index 99% rename from catalyst/modules/catalyst_lock.py rename to catalyst/lock.py index 5311cf84..2d10d2fa 100644 --- a/catalyst/modules/catalyst_lock.py +++ b/catalyst/lock.py @@ -5,7 +5,7 @@ import errno import sys import string import time -from catalyst_support import * +from catalyst.support import * def writemsg(mystr): sys.stderr.write(mystr) diff --git a/catalyst/main.py b/catalyst/main.py index f6a3e511..8acd2804 100644 --- a/catalyst/main.py +++ b/catalyst/main.py @@ -20,7 +20,7 @@ sys.path.append(__selfpath__ + "/modules") import catalyst.config import catalyst.util -from catalyst.modules.catalyst_support import (required_build_targets, +from catalyst.support import (required_build_targets, valid_build_targets, CatalystError, hash_map, find_binary, LockInUse) __maintainer__="Catalyst " @@ -195,7 +195,8 @@ def parse_config(myconfig): conf_values["port_logdir"]=myconf["port_logdir"]; def import_modules(): - # import catalyst's own modules (i.e. catalyst_support and the arch modules) + # import catalyst's own modules + # (i.e. stage and the arch modules) targetmap={} try: @@ -346,7 +347,7 @@ def main(): parse_config(myconfig) # Start checking that digests are valid now that the hash_map was imported - # from catalyst_support + # from catalyst.support if "digests" in conf_values: for i in conf_values["digests"].split(): if i not in hash_map: diff --git a/catalyst/modules/embedded_target.py b/catalyst/modules/embedded_target.py index f38ea00d..7cee7a66 100644 --- a/catalyst/modules/embedded_target.py +++ b/catalyst/modules/embedded_target.py @@ -11,7 +11,7 @@ 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 * +from catalyst.support import * from generic_stage_target import * from stat import * diff --git a/catalyst/modules/generic_stage_target.py b/catalyst/modules/generic_stage_target.py index f04b186d..2b3d7ce8 100644 --- a/catalyst/modules/generic_stage_target.py +++ b/catalyst/modules/generic_stage_target.py @@ -1,8 +1,8 @@ import os,string,imp,types,shutil -from catalyst_support import * +from catalyst.support import * from generic_target import * from stat import * -import catalyst_lock +from catalyst.lock import LockDir PORT_LOGDIR_CLEAN = \ @@ -471,7 +471,7 @@ class generic_stage_target(generic_target): normpath(self.settings["snapshot_cache"] + "/" + self.settings["snapshot"]) self.snapcache_lock=\ - catalyst_lock.LockDir(self.settings["snapshot_cache_path"]) + LockDir(self.settings["snapshot_cache_path"]) print "Caching snapshot to "+self.settings["snapshot_cache_path"] def set_chroot_path(self): @@ -481,7 +481,7 @@ class generic_stage_target(generic_target): """ self.settings["chroot_path"]=normpath(self.settings["storedir"]+\ "/tmp/"+self.settings["target_subpath"]) - self.chroot_lock=catalyst_lock.LockDir(self.settings["chroot_path"]) + self.chroot_lock=LockDir(self.settings["chroot_path"]) def set_autoresume_path(self): self.settings["autoresume_path"]=normpath(self.settings["storedir"]+\ diff --git a/catalyst/modules/generic_target.py b/catalyst/modules/generic_target.py index fe96bd73..de519942 100644 --- a/catalyst/modules/generic_target.py +++ b/catalyst/modules/generic_target.py @@ -1,4 +1,4 @@ -from catalyst_support import * +from catalyst.support import * class generic_target: """ diff --git a/catalyst/modules/grp_target.py b/catalyst/modules/grp_target.py index 69415222..8e700429 100644 --- a/catalyst/modules/grp_target.py +++ b/catalyst/modules/grp_target.py @@ -4,7 +4,7 @@ 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 catalyst.support import * from generic_stage_target import * class grp_target(generic_stage_target): diff --git a/catalyst/modules/livecd_stage1_target.py b/catalyst/modules/livecd_stage1_target.py index 59de9bb8..ac846ecb 100644 --- a/catalyst/modules/livecd_stage1_target.py +++ b/catalyst/modules/livecd_stage1_target.py @@ -3,7 +3,7 @@ LiveCD stage1 target """ # NOTE: That^^ docstring has influence catalyst-spec(5) man page generation. -from catalyst_support import * +from catalyst.support import * from generic_stage_target import * class livecd_stage1_target(generic_stage_target): diff --git a/catalyst/modules/livecd_stage2_target.py b/catalyst/modules/livecd_stage2_target.py index 5be8fd23..1bfd8201 100644 --- a/catalyst/modules/livecd_stage2_target.py +++ b/catalyst/modules/livecd_stage2_target.py @@ -4,7 +4,7 @@ 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 catalyst.support import * from generic_stage_target import * class livecd_stage2_target(generic_stage_target): diff --git a/catalyst/modules/netboot2_target.py b/catalyst/modules/netboot2_target.py index 1ab7e7da..2b3cd208 100644 --- a/catalyst/modules/netboot2_target.py +++ b/catalyst/modules/netboot2_target.py @@ -4,7 +4,7 @@ netboot target, version 2 # NOTE: That^^ docstring has influence catalyst-spec(5) man page generation. import os,string,types -from catalyst_support import * +from catalyst.support import * from generic_stage_target import * class netboot2_target(generic_stage_target): diff --git a/catalyst/modules/netboot_target.py b/catalyst/modules/netboot_target.py index ff2c81fb..9d01b7e2 100644 --- a/catalyst/modules/netboot_target.py +++ b/catalyst/modules/netboot_target.py @@ -4,7 +4,7 @@ netboot target, version 1 # NOTE: That^^ docstring has influence catalyst-spec(5) man page generation. import os,string,types -from catalyst_support import * +from catalyst.support import * from generic_stage_target import * class netboot_target(generic_stage_target): diff --git a/catalyst/modules/snapshot_target.py b/catalyst/modules/snapshot_target.py index ba1bab55..d1b9e40c 100644 --- a/catalyst/modules/snapshot_target.py +++ b/catalyst/modules/snapshot_target.py @@ -3,7 +3,7 @@ Snapshot target """ import os -from catalyst_support import * +from catalyst.support import * from generic_stage_target import * class snapshot_target(generic_stage_target): diff --git a/catalyst/modules/stage1_target.py b/catalyst/modules/stage1_target.py index 5f4ffa0e..8d5a6745 100644 --- a/catalyst/modules/stage1_target.py +++ b/catalyst/modules/stage1_target.py @@ -3,7 +3,7 @@ stage1 target """ # NOTE: That^^ docstring has influence catalyst-spec(5) man page generation. -from catalyst_support import * +from catalyst.support import * from generic_stage_target import * class stage1_target(generic_stage_target): diff --git a/catalyst/modules/stage2_target.py b/catalyst/modules/stage2_target.py index 6083e2bb..15acdeec 100644 --- a/catalyst/modules/stage2_target.py +++ b/catalyst/modules/stage2_target.py @@ -3,7 +3,7 @@ stage2 target, builds upon previous stage1 tarball """ # NOTE: That^^ docstring has influence catalyst-spec(5) man page generation. -from catalyst_support import * +from catalyst.support import * from generic_stage_target import * class stage2_target(generic_stage_target): diff --git a/catalyst/modules/stage3_target.py b/catalyst/modules/stage3_target.py index 4d3a008c..89edd661 100644 --- a/catalyst/modules/stage3_target.py +++ b/catalyst/modules/stage3_target.py @@ -3,7 +3,7 @@ stage3 target, builds upon previous stage2/stage3 tarball """ # NOTE: That^^ docstring has influence catalyst-spec(5) man page generation. -from catalyst_support import * +from catalyst.support import * from generic_stage_target import * class stage3_target(generic_stage_target): diff --git a/catalyst/modules/stage4_target.py b/catalyst/modules/stage4_target.py index ce41b2da..9168f2ee 100644 --- a/catalyst/modules/stage4_target.py +++ b/catalyst/modules/stage4_target.py @@ -3,7 +3,7 @@ stage4 target, builds upon previous stage3/stage4 tarball """ # NOTE: That^^ docstring has influence catalyst-spec(5) man page generation. -from catalyst_support import * +from catalyst.support import * from generic_stage_target import * class stage4_target(generic_stage_target): diff --git a/catalyst/modules/tinderbox_target.py b/catalyst/modules/tinderbox_target.py index ca556108..1d319895 100644 --- a/catalyst/modules/tinderbox_target.py +++ b/catalyst/modules/tinderbox_target.py @@ -3,7 +3,7 @@ Tinderbox target """ # NOTE: That^^ docstring has influence catalyst-spec(5) man page generation. -from catalyst_support import * +from catalyst.support import * from generic_stage_target import * class tinderbox_target(generic_stage_target): diff --git a/catalyst/modules/catalyst_support.py b/catalyst/support.py similarity index 100% rename from catalyst/modules/catalyst_support.py rename to catalyst/support.py