o Optimize all the queries by using EXAMINE and building some INDEXs.
o enclose all the setting SQL stuff in transactions (mostly done).
o clear out maintainers table
+ o jenna needs to use order by to keep aj from going nutzo
==
maintainer, maintainer_id_seq, source, source_id_seq,
src_associations, src_associations_id_seq, suite,
suite_architectures, suite_id_seq
- TO GROUP ftpmaster;
+ TO troup;
-- Give write privileges to the associations tables for AJ for the purposes of `testing'
GRANT ALL ON
SrcOverride "override.potato.$(SECTION).src";
};
+tree "dists/testing"
+{
+ FileList "/org/ftp.debian.org/database/dists/testing_$(SECTION)_binary-$(ARCH).list";
+ SourceFileList "/org/ftp.debian.org/database/dists/testing_$(SECTION)_source.list";
+ Sections "main contrib non-free";
+ Architectures "alpha arm i386 m68k powerpc sparc source";
+ BinOverride "override.woody.$(SECTION)";
+ SrcOverride "override.woody.$(SECTION).src";
+};
+
tree "dists/unstable"
{
FileList "/org/ftp.debian.org/database/dists/unstable_$(SECTION)_binary-$(ARCH).list";
--- /dev/null
+#!/usr/bin/env python
+
+# Fix for bug in katie where dsc_files was initialized from changes and not dsc
+# Copyright (C) 2000 James Troup <james@nocrew.org>
+# $Id: fix.b,v 1.1 2000-12-19 17:23:03 troup 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
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+# "Look around... leaves are brown... and the sky is hazy shade of winter,
+# Look around... leaves are brown... there's a patch of snow on the ground."
+# -- Simon & Garfunkel / 'A Hazy Shade'
+
+################################################################################
+
+import pg, sys, os, string, stat, re
+import utils, db_access
+import apt_pkg;
+
+################################################################################
+
+Cnf = None;
+projectB = None;
+
+bad_arch = re.compile(r'/binary-(hppa|mips|mipsel|sh|hurd-i386)/');
+
+################################################################################
+
+def main ():
+ global Cnf, projectB;
+
+ apt_pkg.init();
+
+ Cnf = apt_pkg.newConfiguration();
+ apt_pkg.ReadConfigFileISC(Cnf,utils.which_conf_file());
+
+ Arguments = [('d',"debug","Claire::Options::Debug", "IntVal"),
+ ('h',"help","Claire::Options::Help"),
+ ('v',"version","Claire::Options::Version")];
+
+ apt_pkg.ParseCommandLine(Cnf,Arguments,sys.argv);
+
+ projectB = pg.connect('projectb', 'localhost');
+
+ db_access.init(Cnf, projectB);
+
+ file = utils.open_file('x', 'r');
+ for line in file.readlines():
+ if string.find(line, '/binary-') != -1:
+ if bad_arch.search(line) != None:
+ new_line = string.replace(line, 'woody/', 'sid/');
+ if new_line == line:
+ print line;
+ sys.exit(2);
+ line = new_line;
+ sys.stdout.write(line);
+
+#######################################################################################
+
+if __name__ == '__main__':
+ main()
+
# Installs Debian packaes
# Copyright (C) 2000 James Troup <james@nocrew.org>
-# $Id: katie,v 1.12 2000-12-18 07:11:25 troup Exp $
+# $Id: katie,v 1.13 2000-12-19 17:23:03 troup 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
reason_filename = re_changes.sub("reason", base_changes_filename);
reject_filename = "%s/REJECT/%s" % (Cnf["Dir::IncomingDir"], reason_filename);
- # Move the .changes files and it's contents into REJECT/
- utils.move (changes_filename, "%s/REJECT/%s" % (Cnf["Dir::IncomingDir"], base_changes_filename));
+ # Move the .changes files and it's contents into REJECT/ (if we can; errors are ignored)
+ try:
+ utils.move (changes_filename, "%s/REJECT/%s" % (Cnf["Dir::IncomingDir"], base_changes_filename));
+ except cant_overwrite_exc:
+ pass;
for file in files.keys():
if os.access(file,os.R_OK) == 0:
- utils.move (file, "%s/REJECT/%s" % (Cnf["Dir::IncomingDir"], file));
+ try:
+ utils.move (file, "%s/REJECT/%s" % (Cnf["Dir::IncomingDir"], file));
+ except cant_overwrite_exc:
+ pass;
# If this is not a manual rejection generate the .reason file and rejection mail message
if manual_reject_mail_filename == "":
# Utility functions
# Copyright (C) 2000 James Troup <james@nocrew.org>
-# $Id: utils.py,v 1.9 2000-12-18 07:11:25 troup Exp $
+# $Id: utils.py,v 1.10 2000-12-19 17:23:03 troup 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
no_files_exc = "No Files: field in .dsc file.";
cant_open_exc = "Can't read file.";
unknown_hostname_exc = "Unknown hostname";
+cant_overwrite_exc = "Permission denied; can't overwrite existent file."
######################################################################################
os.makedirs(dest_dir, 02775);
os.umask(umask);
#print "Moving %s to %s..." % (src, dest);
- shutil.copy2(src, dest);
if os.path.exists(dest) and os.path.isdir(dest):
dest = dest + '/' + os.path.basename(src);
+ # Check for overwrite permission on existent files
+ if os.path.exists(dest) and not os.access(dest, os.W_OK):
+ raise cant_overwrite_exc
+ shutil.copy2(src, dest);
os.chmod(dest, 0664);
os.unlink(src);
os.makedirs(dest_dir, 02775);
os.umask(umask);
#print "Copying %s to %s..." % (src, dest);
- shutil.copy2(src, dest);
if os.path.exists(dest) and os.path.isdir(dest):
dest = dest + '/' + os.path.basename(src);
+ if os.path.exists(dest) and not os.access(dest, os.W_OK):
+ raise cant_overwrite_exc
+ shutil.copy2(src, dest);
os.chmod(dest, 0664);
######################################################################################