build: Fail if user-defined WorkDir does not exist

This commit is contained in:
Fatih Aşıcı
2010-09-26 10:52:40 +00:00
parent c9f32a7bbc
commit d2a84751cc
+4 -2
View File
@@ -578,9 +578,11 @@ class Builder:
def pkg_src_dir(self): def pkg_src_dir(self):
"""Returns the real path of WorkDir for an unpacked archive.""" """Returns the real path of WorkDir for an unpacked archive."""
dirname = self.spec.source.name + "-" + self.spec.getSourceVersion() dirname = self.actionGlobals.get("WorkDir")
dirname = self.actionGlobals.get("WorkDir", dirname) if dirname:
return util.join_path(self.pkg_work_dir(), dirname)
dirname = self.spec.source.name + "-" + self.spec.getSourceVersion()
src_dir = util.join_path(self.pkg_work_dir(), dirname) src_dir = util.join_path(self.pkg_work_dir(), dirname)
if not os.path.exists(src_dir): if not os.path.exists(src_dir):