X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=contrib%2Fhack.1;fp=contrib%2Fhack.1;h=0000000000000000000000000000000000000000;hb=0b523c435c01ba9f4c2fd258baabb792546b7836;hp=473784c48b854673df3e91fa5facd0bfce0158dd;hpb=8d194d3676a27055a8a5f35a53a162334a090d26;p=dak.git diff --git a/contrib/hack.1 b/contrib/hack.1 deleted file mode 100755 index 473784c4..00000000 --- a/contrib/hack.1 +++ /dev/null @@ -1,81 +0,0 @@ -#!/usr/bin/env python - -# Quick hack to import override files -# Copyright (C) 2000 James Troup -# $Id: hack.1,v 1.2 2001-01-16 21:52:37 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 - -################################################################################ - -import os, pg, sys, string -import utils, db_access -import apt_pkg; - -################################################################################ - -Cnf = None; -projectB = None; - -################################################################################ - -def main (): - global Cnf, projectB; - - apt_pkg.init(); - - Cnf = apt_pkg.newConfiguration(); - apt_pkg.ReadConfigFileISC(Cnf,utils.which_conf_file()); - Arguments = [('D',"debug","Alyson::Options::Debug", "IntVal"), - ('h',"help","Alyson::Options::Help"), - ('v',"version","Alyson::Options::Version")]; - apt_pkg.ParseCommandLine(Cnf,Arguments,sys.argv); - - projectB = pg.connect('projectb', 'localhost'); - db_access.init(Cnf, projectB); - - for filename in os.listdir('.'): - if not os.path.isfile(filename) or filename[:9] != 'override.': - continue; - x = string.split(filename, '.') - suite = x[1]; - type = "deb"; - if suite == "experimental": - continue; - else: - component = x[2]; - if suite == "sid": - suite = "unstable"; - elif suite == "potato": - suite = "stable"; - else: - print "say what?"; - sys.exit(3); - if len(x) == 4: - type = x[3]; - if type == "debian-installer": - type = "udeb"; - elif type == "src": - type = "dsc"; - else: - print "say WHAT?"; - sys.exit(4); - print "cat %s | natalie.py --set --suite=%s --component=%s --type=%s" % (filename, suite, component, type); - -####################################################################################### - -if __name__ == '__main__': - main() -