3 import commands, os, string, sys
4 import apt_inst, apt_pkg
14 Cnf = apt_pkg.newConfiguration();
15 apt_pkg.ReadConfigFileISC(Cnf,'/home/troup/katie/katie.conf');
19 dsc_files = apt_pkg.ParseCommandLine(Cnf,Arguments,sys.argv);
21 for dsc_file in dsc_files:
22 dsc = utils.parse_changes(dsc_file);
23 files = utils.build_file_list(dsc, 1);
24 for file in files.keys():
25 if not os.path.exists(file):
26 (result, output) = commands.getstatusoutput("locate %s | grep /org/ftp.debian.org/ftp/dists/potato/" % (file));
28 print "%s: can't find '%s'." % (dsc_file, file);
30 output = string.replace(output, "/org/ftp.debian.org/ftp/dists/potato/", "../potato/");
31 print "symlinking '%s' to '%s'." % (output, file);
32 os.symlink(output, file);
34 if __name__ == '__main__':