changeset 53:74cd21b6400b

rename some variables from pkg_track to track
author Bernhard Herzog <bh@intevation.de>
date Tue, 03 Apr 2007 20:37:07 +0200
parents 78cf5f6778ec
children b0014b8f6029
files enterprise/kdei18n.py treepkg/packager.py
diffstat 2 files changed, 16 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/enterprise/kdei18n.py	Tue Apr 03 20:33:33 2007 +0200
+++ b/enterprise/kdei18n.py	Tue Apr 03 20:37:07 2007 +0200
@@ -49,7 +49,7 @@
         return version_template % locals()
 
     def unpack_orig_tarball(self):
-        orig_tarball = self.pkg_track.orig_tarball
+        orig_tarball = self.track.orig_tarball
         run.call(["tar", "xjf", orig_tarball, "-C", self.work_dir])
         tarbasename = os.path.basename(orig_tarball)
         splitext = os.path.splitext
--- a/treepkg/packager.py	Tue Apr 03 20:33:33 2007 +0200
+++ b/treepkg/packager.py	Tue Apr 03 20:37:07 2007 +0200
@@ -32,8 +32,8 @@
     # Derived classes must supply the package basename
     pkg_basename = None
 
-    def __init__(self, pkg_track, status, work_dir, src_dir, revision):
-        self.pkg_track = pkg_track
+    def __init__(self, track, status, work_dir, src_dir, revision):
+        self.track = track
         self.status = status
         self.work_dir = work_dir
         self.src_dir = src_dir
@@ -64,7 +64,7 @@
         is the return value of the determine_package_version() method.
         """
         temp_dir = os.path.join(self.work_dir, "temp")
-        self.pkg_track.export_sources(temp_dir)
+        self.track.export_sources(temp_dir)
 
         pkgbaseversion = self.determine_package_version(temp_dir)
         pkgbasedir = os.path.join(self.work_dir,
@@ -113,7 +113,7 @@
         debian_dir = os.path.join(pkgbasedir, "debian")
         changelog = os.path.join(debian_dir, "changelog")
 
-        self.pkg_track.copy_debian_directory(debian_dir)
+        self.track.copy_debian_directory(debian_dir)
 
         logging.info("Updating %r", changelog)
         oldversion = util.debian_changelog_version(changelog)
@@ -124,7 +124,7 @@
         run.call(["debchange", "-c", changelog,
                   "-v", oldversionprefix + pkgbaseversion + "-kk1",
                   changemsg],
-                 env=self.pkg_track.debian_environment())
+                 env=self.track.debian_environment())
 
 
     def create_source_package(self, pkgbasedir, origtargz):
@@ -134,7 +134,7 @@
                   os.path.basename(origtargz)],
                  cwd=os.path.dirname(pkgbasedir),
                  suppress_output=True,
-                 env=self.pkg_track.debian_environment())
+                 env=self.track.debian_environment())
 
     def move_source_package(self, pkgbasename):
         """Moves the new source package from the work_dir to the src_dir"""
@@ -174,8 +174,8 @@
 
 class BinaryPackager(object):
 
-    def __init__(self, pkg_track, status, binary_dir, dsc_file, logfile):
-        self.pkg_track = pkg_track
+    def __init__(self, track, status, binary_dir, dsc_file, logfile):
+        self.track = track
         self.status = status
         self.binary_dir = binary_dir
         self.dsc_file = dsc_file
@@ -186,10 +186,10 @@
         util.ensure_directory(self.binary_dir)
         logging.info("Building binary package; loging to %r", self.logfile)
         cmd = ["/usr/sbin/pbuilder", "build",
-               "--configfile", self.pkg_track.pbuilderrc,
+               "--configfile", self.track.pbuilderrc,
                "--logfile", self.logfile,
                "--buildresult", self.binary_dir, self.dsc_file]
-        run.call(self.pkg_track.root_cmd + cmd, suppress_output=True)
+        run.call(self.track.root_cmd + cmd, suppress_output=True)
         self.status.binary_package_created()
 
 
@@ -198,10 +198,10 @@
     source_packager_cls = SourcePackager
     binary_packager_cls = BinaryPackager
 
-    def __init__(self, pkg_track, revision):
-        self.pkg_track = pkg_track
+    def __init__(self, track, revision):
+        self.track = track
         self.revision = revision
-        self.base_dir = self.pkg_track.pkg_dir_for_revision(self.revision, 1)
+        self.base_dir = self.track.pkg_dir_for_revision(self.revision, 1)
         self.status = status.RevisionStatus(os.path.join(self.base_dir,
                                                          "status"))
 
@@ -223,7 +223,7 @@
         try:
             util.ensure_directory(self.work_dir)
             self.status.start = datetime.datetime.utcnow()
-            src_packager = self.source_packager_cls(self.pkg_track, self.status,
+            src_packager = self.source_packager_cls(self.track, self.status,
                                                     self.work_dir, self.src_dir,
                                                     self.revision)
             src_packager.package()
@@ -232,7 +232,7 @@
             if dsc_file is None:
                 raise RuntimeError("Cannot find dsc File in %r" % self.src_dir)
 
-            bin_packager = self.binary_packager_cls(self.pkg_track, self.status,
+            bin_packager = self.binary_packager_cls(self.track, self.status,
                                                     self.binary_dir, dsc_file,
                                                     self.build_log)
             bin_packager.package()
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)