3 # Fix for bug in katie where dsc_files was initialized from changes and not dsc
4 # Copyright (C) 2000 James Troup <james@nocrew.org>
5 # $Id: fix.b,v 1.1 2000-12-19 17:23:03 troup Exp $
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 # "Look around... leaves are brown... and the sky is hazy shade of winter,
22 # Look around... leaves are brown... there's a patch of snow on the ground."
23 # -- Simon & Garfunkel / 'A Hazy Shade'
25 ################################################################################
27 import pg, sys, os, string, stat, re
28 import utils, db_access
31 ################################################################################
36 bad_arch = re.compile(r'/binary-(hppa|mips|mipsel|sh|hurd-i386)/');
38 ################################################################################
45 Cnf = apt_pkg.newConfiguration();
46 apt_pkg.ReadConfigFileISC(Cnf,utils.which_conf_file());
48 Arguments = [('d',"debug","Claire::Options::Debug", "IntVal"),
49 ('h',"help","Claire::Options::Help"),
50 ('v',"version","Claire::Options::Version")];
52 apt_pkg.ParseCommandLine(Cnf,Arguments,sys.argv);
54 projectB = pg.connect('projectb', 'localhost');
56 db_access.init(Cnf, projectB);
58 file = utils.open_file('x', 'r');
59 for line in file.readlines():
60 if string.find(line, '/binary-') != -1:
61 if bad_arch.search(line) != None:
62 new_line = string.replace(line, 'woody/', 'sid/');
67 sys.stdout.write(line);
69 #######################################################################################
71 if __name__ == '__main__':