extras-buildsys/server BuildJob.py,1.11,1.12 Repo.py,1.3,1.4

Daniel Williams (dcbw) fedora-extras-commits at redhat.com
Wed Jun 29 18:06:15 UTC 2005


Author: dcbw

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

Modified Files:
	BuildJob.py Repo.py 
Log Message:
2005-06-29  Dan Williams <dcbw at redhat.com>

    * Copy finished SRPMs to the correct directories in the repo




Index: BuildJob.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/server/BuildJob.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- BuildJob.py	29 Jun 2005 05:23:00 -0000	1.11
+++ BuildJob.py	29 Jun 2005 18:06:12 -0000	1.12
@@ -475,7 +475,10 @@
                     continue
                 src_file = os.path.join(self.stage_dir, job.arch, f)
                 verrel = "%s-%s" % (self.ver, self.release)
-                dst_path = os.path.join(config_opts['repo_dir'], self.target, self.name, verrel, job.arch)
+                if f.endswith(".src.rpm"):
+                    dst_path = os.path.join(config_opts['repo_dir'], self.target, self.name, verrel, "SRPM")
+                else:
+                    dst_path = os.path.join(config_opts['repo_dir'], self.target, self.name, verrel, job.arch)
                 self.repofiles[src_file] = dst_path
 
         # Request the repo copy our files.  It will get the file


Index: Repo.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/server/Repo.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Repo.py	26 Jun 2005 14:52:30 -0000	1.3
+++ Repo.py	29 Jun 2005 18:06:12 -0000	1.4
@@ -67,7 +67,14 @@
                 dst = buildjob.repofiles[src]
                 if not os.path.exists(os.path.dirname(dst)):
                     os.makedirs(os.path.dirname(dst))
-                shutil.copy(src, dst)
+
+                # Only copy SRPMs to the repo dir if there's not already one there
+                if src.endswith(".src.rpm"):
+                    file_in_dst = os.path.join(os.path.dirname(dst),os.path.basename(src))
+                    if not os.path.exists(file_in_dst):
+                        shutil.copy(src, dst)
+                else:
+                    shutil.copy(src, dst)
 
             # Notify the build job that we've copied its files to the repo
             buildjob.repo_add_callback()




More information about the fedora-extras-commits mailing list