From: James Troup Date: Sun, 31 Mar 2002 16:14:48 +0000 (+0000) Subject: Add CopyKatie support a la CopyChanges X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=95e0e4e7ec7bb1fddc39c49db3549aa02f518e2a;p=dak.git Add CopyKatie support a la CopyChanges --- diff --git a/docs/README.config b/docs/README.config index d5caaff3..1ee64ca0 100644 --- a/docs/README.config +++ b/docs/README.config @@ -72,6 +72,18 @@ put in the Release files. OverrideCodeName is used by Denise. Priority determines which suite is used for the Maintainers file as generated by charisma/da_mkmaintainers (highest wins). +If CopyChanges is present it should be a path into the archive +(i.e. "Dir::RootDir"); any upload targeted for a suite with this +config option present will have the .changes file copied into that +path. + +If CopyKatie is present it should be an absolute path; any upload +targeted for a suite with this config option present will have the +.katie file copied into that path. This option is similar to +CopyChanges and will most often be used with it; they're seperate +because .changes files are mirrored and .katie files aren't, so the +paths will usually be different. + ================================================================================ Dinstall diff --git a/katie b/katie index ca90a9d1..33b96b27 100755 --- a/katie +++ b/katie @@ -2,7 +2,7 @@ # Installs Debian packages # Copyright (C) 2000, 2001 James Troup -# $Id: katie,v 1.75 2002-03-08 03:59:50 rmurray Exp $ +# $Id: katie,v 1.76 2002-03-31 16:14:48 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 @@ -39,7 +39,7 @@ import db_access, katie, logging, utils; ############################################################################### # Globals -katie_version = "$Revision: 1.75 $"; +katie_version = "$Revision: 1.76 $"; Cnf = None; Options = None; @@ -347,7 +347,7 @@ def install (): old_filename = ql[0] + ql[1]; file_size = ql[2]; file_md5sum = ql[3]; - new_filename = utils.poolify (changes["source"], dsc_component) + os.path.basename(old_filename); + new_filename = utils.poolify(changes["source"], dsc_component) + os.path.basename(old_filename); new_files_id = db_access.get_files_id(new_filename, file_size, file_md5sum, dsc_location_id); if new_files_id == None: utils.copy(old_filename, Cnf["Dir::PoolDir"] + new_filename); @@ -356,15 +356,18 @@ def install (): # Install the files into the pool for file in files.keys(): - destination = Cnf["Dir::PoolDir"] + files[file]["pool name"] + file - utils.move (file, destination) + destination = Cnf["Dir::PoolDir"] + files[file]["pool name"] + file; + utils.move(file, destination); Logger.log(["installed", file, files[file]["type"], files[file]["size"], files[file]["architecture"]]); - install_bytes = install_bytes + float(files[file]["size"]) + install_bytes = install_bytes + float(files[file]["size"]); # Copy the .changes file across for suite which need it. for suite in changes["distribution"].keys(): if Cnf.has_key("Suite::%s::CopyChanges" % (suite)): - utils.copy (pkg.changes_file, Cnf["Dir::RootDir"] + Cnf["Suite::%s::CopyChanges" % (suite)]); + utils.copy(pkg.changes_file, Cnf["Dir::RootDir"] + Cnf["Suite::%s::CopyChanges" % (suite)]); + # and the .katie file... + if Cnf.has_key("Suite::%s::CopyKatie" % (suite)): + utils.copy(Katie.pkg.changes_file[:-8]+".katie", Cnf["Suite::%s::CopyKatie" % (suite)]); projectB.query("COMMIT WORK");