+#!/usr/bin/env python
+
+# Generate file list for unstable_accepted
+# Copyright (C) 2002 James Troup <james@nocrew.org>
+# $Id: cameron,v 1.1 2002-05-05 19:59:32 rmurray 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 pg, string, os, sys
+import apt_pkg
+import db_access, utils, claire, logging
+
+################################################################################
+
+projectB = None
+Cnf = None
+Logger = None;
+
+################################################################################
+
+def main():
+ global Cnf, projectB;
+
+ Cnf = utils.get_conf()
+
+ Arguments = [('h',"help","Cameron::Options::Help")];
+
+ apt_pkg.ParseCommandLine(Cnf,Arguments,sys.argv);
+
+ projectB = pg.connect(Cnf["DB::Name"], Cnf["DB::Host"], int(Cnf["DB::Port"]));
+ db_access.init(Cnf, projectB);
+ list = utils.open_file("%s/unstable_accepted.list" % (Cnf["Dir::ListsDir"]), "w")
+ q = projectB.query("SELECT filename FROM unstable_accepted WHERE in_accepted AND filename ~ '(u?deb|dsc)$'");
+ entries = q.getresult();
+ for entry in entries:
+ filename = os.path.dirname(entry[0])+'/incoming/'+os.path.basename(entry[0]);
+ list.write("%s\n" % (filename))
+ list.close()
+
+#########################################################################################
+
+if __name__ == '__main__':
+ main()