extras-buildsys/server PackageJob.py,1.32,1.33
Daniel Williams (dcbw)
fedora-extras-commits at redhat.com
Tue Oct 25 15:16:12 UTC 2005
Author: dcbw
Update of /cvs/fedora/extras-buildsys/server
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv2716/server
Modified Files:
PackageJob.py
Log Message:
2005-10-25 Dan Williams <dcbw at redhat.com>
* server/PackageJob.py
- (_stage_prep): fail the job if we can't access the SRPM here. Can
happen if the server restarts and requeues waiting jobs, but the
SRPM isn't around anymore for some reason.
Index: PackageJob.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/server/PackageJob.py,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- PackageJob.py 25 Oct 2005 04:33:36 -0000 1.32
+++ PackageJob.py 25 Oct 2005 15:16:10 -0000 1.33
@@ -366,6 +366,12 @@
if self.use_cvs == False:
self.srpm_path = self._source
+ # fail the job if we can't access the SRPM. Can happen during
+ # requeue of jobs when restarting the server.
+ if not os.path.exists(self.srpm_path) or not os.access(self.srpm_path, os.R_OK):
+ msg = "Could not access SRPM located at %s during prep stage." % self.srpm_path
+ raise PrepError(msg)
+
ts = rpmUtils.transaction.initReadOnlyTransaction()
hdr = rpmUtils.miscutils.hdrFromPackage(ts, self.srpm_path)
self.name = hdr['name']
More information about the fedora-extras-commits
mailing list