# Checks Debian packages from Incoming
# Copyright (C) 2000, 2001 James Troup <james@nocrew.org>
-# $Id: jennifer,v 1.8 2002-02-25 15:38:06 troup Exp $
+# $Id: jennifer,v 1.9 2002-03-14 14:12:04 ajt Exp $
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
################################################################################
# Globals
-jennifer_version = "$Revision: 1.8 $";
+jennifer_version = "$Revision: 1.9 $";
Cnf = None;
Options = None;
file_keys = files.keys();
- # Move all the files into the accepted directory
+ # Move all the files into the byhand directory
utils.move (pkg.changes_file, Cnf["Dir::QueueByhandDir"]);
for file in file_keys:
- utils.move (file, Cnf["Dir::QueueByhandDir"]);
+ utils.move (file, Cnf["Dir::QueueByhandDir"], perms=0660);
# Check for override disparities
if not Cnf["Dinstall::Options::No-Mail"]:
# Move all the files into the accepted directory
utils.move (pkg.changes_file, Cnf["Dir::QueueNewDir"]);
for file in file_keys:
- utils.move (file, Cnf["Dir::QueueNewDir"]);
+ utils.move (file, Cnf["Dir::QueueNewDir"], perms=0660);
if not Options["No-Mail"]:
print "Sending new ack.";
# Utility functions for katie
# Copyright (C) 2001 James Troup <james@nocrew.org>
-# $Id: katie.py,v 1.10 2002-03-06 07:39:24 rmurray Exp $
+# $Id: katie.py,v 1.11 2002-03-14 14:12:04 ajt Exp $
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# someone is trying to exploit us.
utils.warn("**WARNING** failed to move %s from the reject directory to the morgue." % (file));
return;
- utils.move(dest_file, morgue_file);
+ utils.move(dest_file, morgue_file, perms=0660);
try:
os.open(dest_file, os.O_RDWR|os.O_CREAT|os.O_EXCL, 0644);
except OSError, e:
raise;
# If we got here, we own the destination file, so we can
# safely overwrite it.
- utils.move(file, dest_file, 1);
+ utils.move(file, dest_file, 1, perms=0660);
+
###########################################################################
# Clean incoming of old unused files
# Copyright (C) 2000, 2001 James Troup <james@nocrew.org>
-# $Id: shania,v 1.12 2002-02-12 22:14:38 troup Exp $
+# $Id: shania,v 1.13 2002-03-14 14:12:04 ajt Exp $
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# If the destination file exists; try to find another filename to use
if os.path.exists(dest_filename):
dest_filename = utils.find_next_free(dest_filename, 10);
- utils.move(file, dest_filename);
+ utils.move(file, dest_filename, 0660);
else:
utils.warn("skipping '%s', permission denied." % (os.path.basename(file)));
# Utility functions
# Copyright (C) 2000, 2001 James Troup <james@nocrew.org>
-# $Id: utils.py,v 1.39 2002-02-22 02:19:26 troup Exp $
+# $Id: utils.py,v 1.40 2002-03-14 14:12:04 ajt Exp $
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
######################################################################################
-def move (src, dest, overwrite = 0):
+def move (src, dest, overwrite = 0, perms = 0664):
if os.path.exists(dest) and os.path.isdir(dest):
dest_dir = dest;
else:
if not os.access(dest, os.W_OK):
raise cant_overwrite_exc
shutil.copy2(src, dest);
- os.chmod(dest, 0664);
+ os.chmod(dest, perms);
os.unlink(src);
-def copy (src, dest, overwrite = 0):
+def copy (src, dest, overwrite = 0, perms = 0664):
if os.path.exists(dest) and os.path.isdir(dest):
dest_dir = dest;
else:
if not os.access(dest, os.W_OK):
raise cant_overwrite_exc
shutil.copy2(src, dest);
- os.chmod(dest, 0664);
+ os.chmod(dest, perms);
######################################################################################