[PATCH] Don't assume that files listed in .changes have been uploaded.

Serafeim Zanikolas serzan at hellug.gr
Tue Feb 17 00:33:13 CET 2009


---
 bin/debexpo-importer |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/bin/debexpo-importer b/bin/debexpo-importer
index 93f69dc..1af38f9 100755
--- a/bin/debexpo-importer
+++ b/bin/debexpo-importer
@@ -92,7 +92,7 @@ class Importer(object):
         """
         if hasattr(self, 'files'):
             for file in self.files:
-                os.remove(file)
+                os.path.exists(file) and os.remove(file)
 
         self._remove_changes()
 
@@ -428,6 +428,13 @@ class Importer(object):
             else:
                 toinstall.append(file)
 
+        # Check for missing files
+        missing_files = [f for f in toinstall if not os.path.exists(f)]
+        if missing_files:
+            self._reject('The following files are listed in the .changes ' +
+                         'file but have not been uploaded:\n\n%s' %
+                         "\n".join(missing_files))
+
         # Install files in repository
         for file in toinstall:
             shutil.move(file, os.path.join(destdir, file))
-- 
1.5.6.5



More information about the debexpo-devel mailing list