* dak/transitions.py (temp_transitions_file): Use the TempPath
(write_transitions_from_file): Check if the file we should get our
transitions from is in our TempPath, error out if it isnt
+ (main): Check for TempPath existance
2008-04-12 James Troup <troup@debian.org>
# We need the chmod, as the file is (most possibly) copied from a
# sudo-ed script and would be unreadable if it has default mkstemp mode
- (fd, path) = tempfile.mkstemp("","transitions",Cnf["Transitions::TempPath"])
+ (fd, path) = tempfile.mkstemp("", "transitions", Cnf["Transitions::TempPath"])
os.chmod(path, 0644)
f = open(path, "w")
syck.dump(transitions, f)
daklib.utils.warn("ReleaseTransitions file, %s, not found." %
(Cnf["Dinstall::Reject::ReleaseTransitions"]))
sys.exit(1)
+ # Also check if our temp directory is defined and existant
+ temppath = Cnf.get("Transitions::TempPath", "")
+ if temppath == "":
+ daklib.utils.warn("Transitions::TempPath not defined")
+ sys.exit(1)
+ if not os.path.exists(temppath):
+ daklib.utils.warn("Temporary path %s not found." %
+ (Cnf["Transitions::TempPath"]))
+ sys.exit(1)
if Options["import"]:
try: