extras-buildsys/server Config.py, 1.9, 1.10 PackageJob.py, 1.34, 1.35 UserInterface.py, 1.58, 1.59

Daniel Williams (dcbw) fedora-extras-commits at redhat.com
Mon Nov 14 04:56:04 UTC 2005


Author: dcbw

Update of /cvs/fedora/extras-buildsys/server
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv10553/server

Modified Files:
	Config.py PackageJob.py UserInterface.py 
Log Message:
Clean up some target config code


Index: Config.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/server/Config.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- Config.py	24 Oct 2005 15:34:05 -0000	1.9
+++ Config.py	14 Nov 2005 04:56:02 -0000	1.10
@@ -161,6 +161,7 @@
         self._target = self.get_str("General", "target")
         self._base_arches = self.get_str("Arches", "base_arches")
         self._repo = self.get_str("General", "repo")
+        self._testing = self.get_bool("General", "testing")
 
     def parent_cfg(self):
         return self._parent_cfg
@@ -188,6 +189,9 @@
     def repo(self):
         return self._repo
 
+    def testing(self):
+        return self._testing
+
     def addl_pkg_arches(self):
         if not self._config.has_section("Additional Package Arches"):
             return {}


Index: PackageJob.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/server/PackageJob.py,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- PackageJob.py	13 Nov 2005 04:27:55 -0000	1.34
+++ PackageJob.py	14 Nov 2005 04:56:02 -0000	1.35
@@ -544,7 +544,7 @@
 
             # Only non-testing targets kill remaining jobs and file the entire
             # build when one archjob fails
-            if self._target_cfg.get_bool("General", "testing") == False:
+            if self._target_cfg.testing() == False:
                 # Kill remaining jobs on other arches
                 self._kill_all_archjobs()
                 self._stage_failed(e.msg)
@@ -583,7 +583,7 @@
 
         if completed_jobs == len(self.archjobs):
             # Testing targets don't contribute packages to the repo
-            if self._target_cfg.get_bool("General", "testing") == True:
+            if self._target_cfg.testing() == True:
                 if failed_jobs > 0:
                     self._stage_failed("Job failed on one or more architectures.")
                 else:
@@ -610,8 +610,7 @@
 
         # If its a testing target, we keep the RPMs around since they don't
         # get copied to the repository, they only live in the repodir
-        testing_target = self._target_cfg.get_bool("General", "testing")
-        if self.result == 'success' and testing_target == True:
+        if self.result == 'success' and self._target_cfg.testing() == True:
             return
 
         srpm_file = os.path.join(self.result_dir, os.path.basename(self.srpm_http_path))


Index: UserInterface.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/server/UserInterface.py,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- UserInterface.py	5 Oct 2005 14:05:57 -0000	1.58
+++ UserInterface.py	14 Nov 2005 04:56:02 -0000	1.59
@@ -80,10 +80,7 @@
 
     # If it wasn't an alias, try actual target names
     if not target_cfg:
-        for tcfg in cfg.targets():
-            if alias == tcfg.target_string():
-                target_cfg = tcfg
-                break
+        target_cfg = cfg.resolve_target_string(alias)
     return target_cfg
 
 




More information about the fedora-extras-commits mailing list