Mercurial > treepkg
changeset 8:574506a022f6
Rename AssemblyLine to PackageLine
author | Bernhard Herzog <bh@intevation.de> |
---|---|
date | Fri, 09 Mar 2007 14:48:58 +0100 |
parents | 96f4f58c62b5 |
children | 16689c948bbc |
files | enterprise/kdei18n.py enterprise/kdepim.py runtreepkg.py treepkg/packager.py treepkg/readconfig.py |
diffstat | 5 files changed, 18 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/enterprise/kdei18n.py Fri Mar 09 14:33:50 2007 +0100 +++ b/enterprise/kdei18n.py Fri Mar 09 14:48:58 2007 +0100 @@ -112,7 +112,7 @@ source_packager_cls = SourcePackager -class AssemblyLine(treepkg.packager.AssemblyLine): +class PackageLine(treepkg.packager.PackageLine): revision_packager_cls = RevisionPackager @@ -122,5 +122,5 @@ def __init__(self, *args, **kw): self.orig_tarball = kw.pop("orig_tarball") - super(AssemblyLine, self).__init__(*args, **kw) + super(PackageLine, self).__init__(*args, **kw)
--- a/enterprise/kdepim.py Fri Mar 09 14:33:50 2007 +0100 +++ b/enterprise/kdepim.py Fri Mar 09 14:48:58 2007 +0100 @@ -75,7 +75,7 @@ source_packager_cls = SourcePackager -class AssemblyLine(treepkg.packager.AssemblyLine): +class PackageLine(treepkg.packager.PackageLine): revision_packager_cls = RevisionPackager
--- a/runtreepkg.py Fri Mar 09 14:33:50 2007 +0100 +++ b/runtreepkg.py Fri Mar 09 14:48:58 2007 +0100 @@ -12,7 +12,7 @@ import logging from optparse import OptionParser -from treepkg.packager import create_packager, PackagerGroup +from treepkg.packager import create_package_line, PackagerGroup from treepkg.readconfig import read_config def initialize_logging(): @@ -37,7 +37,8 @@ initialize_logging() treepkg_opts, packager_opts = read_config(options.config_file) - group = PackagerGroup([create_packager(**opts) for opts in packager_opts], + group = PackagerGroup([create_package_line(**opts) + for opts in packager_opts], **treepkg_opts) group.run()
--- a/treepkg/packager.py Fri Mar 09 14:33:50 2007 +0100 +++ b/treepkg/packager.py Fri Mar 09 14:48:58 2007 +0100 @@ -235,7 +235,7 @@ shutil.rmtree(self.base_dir) -class AssemblyLine(object): +class PackageLine(object): revision_packager_cls = RevisionPackager @@ -342,15 +342,15 @@ logging.info("New revision already packaged.") -def create_packager(packager_class, **kw): +def create_package_line(packager_class, **kw): module = util.import_dotted_name(packager_class) - return module.AssemblyLine(**kw) + return module.PackageLine(**kw) class PackagerGroup(object): - def __init__(self, assembly_lines, check_interval): - self.assembly_lines = assembly_lines + def __init__(self, package_lines, check_interval): + self.package_lines = package_lines self.check_interval = check_interval def run(self): @@ -361,7 +361,7 @@ while 1: now = time.time() if now > last_check + self.check_interval: - self.check_assembly_lines() + self.check_package_lines() last_check = now next_check = now + self.check_interval to_sleep = next_check - time.time() @@ -373,14 +373,14 @@ else: logging.info("Next check now") - def check_assembly_lines(self): - logging.info("Checking assembly lines") - for line in self.assembly_lines: + def check_package_lines(self): + logging.info("Checking package lines") + for line in self.package_lines: try: packager = line.package_if_updated() if packager: packager.package() except: logging.exception("An error occurred while" - " checking assembly line %r", line.name) - logging.info("Checked all assembly lines") + " checking packager line %r", line.name) + logging.info("Checked all packager lines")
--- a/treepkg/readconfig.py Fri Mar 09 14:33:50 2007 +0100 +++ b/treepkg/readconfig.py Fri Mar 09 14:48:58 2007 +0100 @@ -63,7 +63,7 @@ if section.startswith("pkg_"): packager_class = parser.get(section, "packager_class") module = util.import_dotted_name(packager_class) - desc = packager_desc + module.AssemblyLine.extra_config_desc + desc = packager_desc + module.PackageLine.extra_config_desc packagers.append(read_config_section(parser, section, desc, dict(name=section[4:])))