From: James Troup Date: Wed, 31 Jan 2001 03:36:36 +0000 (+0000) Subject: sync X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=8e7b460758fb8a59697f2a95f1dc6279a676998f;p=dak.git sync --- diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..2fd1dd28 --- /dev/null +++ b/Makefile @@ -0,0 +1,5 @@ +sql-aptvc.so: sql-aptvc.cpp + gcc -Wall -I/usr/include/postgresql/ sql-aptvc.cpp -fPIC -shared -lapt-pkg -o sql-aptvc.so + +clean: + rm -f sql-aptvc.so diff --git a/TODO b/TODO index e66fbb38..b119abaf 100644 --- a/TODO +++ b/TODO @@ -4,18 +4,25 @@ TOFIX Urgent ------ - o Add an 'add' ability to melanie (? separate prog maybe) + o migrate proposed-updates and experimental to the pool; this allows + us to remove the null component handling and de facto fixes the + ssh + w3m multi-component problem. + + o Write something to sync architectures. + + o Make experimental work o fix katie's handling of source packages in different directories; e.g. if a package moves from main to contrib, the .orig.tar.gz needs to what? copy or be moved and old source removed; one of the two. - o fix ssh appearing in 3 packages files - - o maintainers file needs overrides - - o Make experimental work + o maintainers file needs overrides + + [ change override.maintainer to override.maintainer-from + + override.maintainer-to and have them reference the maintainers + table. Then fix charisma to use them and write some scripting + to handle the Santiago situation. ] o need to have process_it run a big try: loop so that individual package screws up don't kill the daily cron run. @@ -24,6 +31,7 @@ Less Urgent ----------- o check out hardlinks [aj] + o Add an 'add' ability to melanie (? separate prog maybe) o [Hard] Need to merge non-non-US and non-US DBs. o [Easy] Need to vacuum daily o [Easy] remove empty directories in the pool in cron.weekly or so diff --git a/catherine b/catherine index 573d57e7..09a92ab9 100755 --- a/catherine +++ b/catherine @@ -2,7 +2,7 @@ # Poolify (move packages from "legacy" type locations to pool locations) # Copyright (C) 2000 James Troup -# $Id: catherine,v 1.1 2000-11-24 00:20:11 troup Exp $ +# $Id: catherine,v 1.2 2001-01-31 03:36:36 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 @@ -18,6 +18,10 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# "Welcome to where time stands still, +# No one leaves and no one will." +# - Sanitarium - Metallica / Master of the puppets + ################################################################################ import pg @@ -39,42 +43,17 @@ def main (): Cnf = apt_pkg.newConfiguration(); apt_pkg.ReadConfigFileISC(Cnf,utils.which_conf_file()); - Arguments = [('d',"debug","Heidi::Options::Debug", "IntVal"), + Arguments = [('D',"debug","Heidi::Options::Debug", "IntVal"), ('h',"help","Heidi::Options::Help"), - ('v',"version","Heidi::Options::Version")]; + ('V',"version","Heidi::Options::Version")]; amount = apt_pkg.ParseCommandLine(Cnf,Arguments,sys.argv); - print amount - - return - projectB = pg.connect('projectb', 'localhost'); - db_access.init(Cnf, projectB); - if (Cnf["Heidi::Options::Add"] == "" and Cnf["Heidi::Options::Remove"] == "") or (Cnf["Heidi::Options::Add"] != "" and Cnf["Heidi::Options::Remove"] != ""): - - sys.stderr.write("Need either --add or --remove command line argument; not neither or both.\n"); - sys.exit(2); - - for i in ("add", "remove"): - suite = Cnf["Heidi::Options::%s" % (i)]; - if suite !="": - if not Cnf.has_key("Suite::%s" % (suite)): - sys.stderr.write("Unknown suite %s.\n" %(suite)); - sys.exit(2); - else: - suite_id = db_access.get_suite_id(suite); - action = i; - - if file_list != []: - for file in file_list: - process_file(utils.open_file(file_list[0],'r'), suite_id, action); - else: - process_file(sys.stdin, suite_id, action); - - db_access.init (Cnf, projectB); + + ####################################################################################### diff --git a/debian/control b/debian/control index 58de53b3..9f00682c 100644 --- a/debian/control +++ b/debian/control @@ -1,6 +1,7 @@ Source: katie Section: misc Priority: extra +Build-Depends: postgresql-dev, libapt-pkg-dev Maintainer: James Troup Standards-Version: 3.2.1 diff --git a/katie b/katie index 13edbd85..1532a5e1 100755 --- a/katie +++ b/katie @@ -2,7 +2,7 @@ # Installs Debian packaes # Copyright (C) 2000 James Troup -# $Id: katie,v 1.25 2001-01-28 09:06:44 troup Exp $ +# $Id: katie,v 1.26 2001-01-31 03:36:36 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 @@ -505,7 +505,6 @@ def check_dsc (): q = projectB.query("SELECT l.path, f.filename, l.type, f.id FROM files f, location l WHERE (f.filename ~ '/%s$' OR f.filename = '%s') AND l.id = f.location" % (utils.regex_safe(dsc_file), dsc_file)); ql = q.getresult(); - if ql != []: # Unfortunately, we make get more than one match # here if, for example, the package was in potato @@ -615,7 +614,7 @@ def check_override (): override_section = files[file]["override section"]; if section != override_section and section != "-": # Ignore this; it's a common mistake and not worth whining about - if section == "non-US/main" and override_section == "non-US": + if string.lower(section) == "non-us/main" and string.lower(override_section) == "non-us": continue; summary = summary + "%s: section is overridden from %s to %s.\n" % (file, section, override_section); if files[file]["type"] == "deb": # don't do priority for source diff --git a/melanie b/melanie index c76d7015..377547a9 100755 --- a/melanie +++ b/melanie @@ -2,7 +2,7 @@ # General purpose archive tool for ftpmaster # Copyright (C) 2000 James Troup -# $Id: melanie,v 1.3 2001-01-28 09:06:44 troup Exp $ +# $Id: melanie,v 1.4 2001-01-31 03:36:36 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 @@ -102,12 +102,12 @@ def main (): con_suites = "AND ("; for suite in string.split(Cnf["Melanie::Options::Suite"]): - if suite == "stable": + if not Cnf["Melanie::Options::No-Action"] and suite == "stable": print "**WARNING** About to remove from the stable suite!" print "This should only be done just prior to a (point) release and not at" print "any other time." game_over(); - elif suite == "testing": + elif not Cnf["Melanie::Options::No-Action"] and suite == "testing": print "**WARNING About to remove from the testing suite!" print "There's no need to do this normally as removals from unstable will" print "propogate to testing automagically." @@ -210,7 +210,7 @@ def main (): # If we don't have a reason; spawn an editor so the user can add one # Write the rejection email out as the .reason file - if not Cnf["Melanie::Options::Reason"]: + if not Cnf["Melanie::Options::Reason"] and not Cnf["Melanie::Options::No-Action"]: temp_filename = tempfile.mktemp(); fd = os.open(temp_filename, os.O_RDWR|os.O_CREAT|os.O_EXCL, 0700); os.close(fd); diff --git a/sql-aptvc.cpp b/sql-aptvc.cpp new file mode 100644 index 00000000..27bebe47 --- /dev/null +++ b/sql-aptvc.cpp @@ -0,0 +1,34 @@ +/* Wrapper round apt's version compare functions for PostgreSQL. */ +/* Copyright (C) 2001, James Troup */ + +/* 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 + */ + +#include + +extern "C" +{ + +#include +#include + + int versioncmp(text *A, text *B); + + int versioncmp (text *A, text *B) + { + return debVS.CmpVersion (VARDATA(A), VARDATA(B)); + } + +}