]> git.decadent.org.uk Git - dak.git/blobdiff - rhona
make use of utils.{warn,fubar}. clean up extraneous \n's in fernanda and natalie...
[dak.git] / rhona
diff --git a/rhona b/rhona
index e3f5c022a2dfcf353e0e6d5183f5cc37ed3576e8..c05db3129836a4bdc39320bcf59e4d85ea83caf0 100755 (executable)
--- a/rhona
+++ b/rhona
@@ -2,7 +2,7 @@
 
 # rhona, cleans up unassociated binary and source packages
 # Copyright (C) 2000, 2001  James Troup <james@nocrew.org>
-# $Id: rhona,v 1.14 2001-05-31 02:19:30 troup Exp $
+# $Id: rhona,v 1.15 2001-06-22 22:53:14 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,6 @@ projectB = None
 Cnf = None
 now_date = None;     # mark newly "deleted" things as deleted "now"
 delete_date = None;  # delete things marked "deleted" earler than this
-overrides = {};
 
 tried_too_hard_exc = "Tried too hard to find a free filename for %s; something's gone Pete Tong";
 
@@ -106,8 +105,7 @@ def check_sources():
 
     print "Checking for orphaned source packages..."
 
-    # Get the list of source packages not in a suite and not linked to
-    # by any binary packages.
+    # Get the list of source packages not in a suite.
 
     q = projectB.query("""
 SELECT s.id, s.file FROM source s
@@ -219,7 +217,7 @@ def clean():
     for i in q.getresult():
         filename = i[0] + i[1];
         if not os.path.exists(filename):
-            sys.stderr.write("E: can not find %s.\n" % (filename));
+            utils.warn("can not find '%s'." % (filename));
             continue;
         if os.path.isfile(filename):
             if os.path.islink(filename):
@@ -242,8 +240,7 @@ def clean():
                 else:
                     utils.move(filename, dest_filename);
         else:
-            sys.stderr.write("%s is neither symlink nor file?!\n" % (filename));
-            sys.exit(1);
+            utils.fubar("%s is neither symlink nor file?!" % (filename));
             
     # Delete from the 'files' table
     if not Cnf["Rhona::Options::No-Action"]:
@@ -300,10 +297,6 @@ def main():
         print "rhona version 0.0000000000";
         usage(0);
 
-    override_filename = Cnf["Dir::OverrideDir"] + Cnf["Rhona::OverrideFilename"];
-    if not os.access(override_filename, os.R_OK):
-        sys.stderr.write("W: Could not find source-only override file '%s'.\n" % (override_filename));
-
     now_date = time.strftime("%Y-%m-%d %H:%M", time.localtime(time.time()));
     delete_date = time.strftime("%Y-%m-%d %H:%M", time.localtime(time.time()-int(Cnf["Rhona::StayOfExecution"])));