pld-ftp-admin: modules/ftptree.py Duplicate packages with different version...

arekm arekm at pld-linux.org
Mon Jan 10 19:09:15 CET 2011


Author: arekm                        Date: Mon Jan 10 18:09:15 2011 GMT
Module: pld-ftp-admin                 Tag: HEAD
---- Log message:
Duplicate packages with different version or release are considered to be errors.

---- Files affected:
pld-ftp-admin/modules:
   ftptree.py (1.48 -> 1.49) 

---- Diffs:

================================================================
Index: pld-ftp-admin/modules/ftptree.py
diff -u pld-ftp-admin/modules/ftptree.py:1.48 pld-ftp-admin/modules/ftptree.py:1.49
--- pld-ftp-admin/modules/ftptree.py:1.48	Sun Jan  9 19:32:51 2011
+++ pld-ftp-admin/modules/ftptree.py	Mon Jan 10 19:09:10 2011
@@ -291,6 +291,7 @@
     def testmove(self, dsttree, archivetree = None):
         self.__checkbuild(self.marked4moving)
         self.__checkarchs(dsttree, self.marked4moving)
+        self.__checduplicates(self.marked4moving)
 
         self.__checksigns(dsttree, self.marked4moving, test = True)
         self.__checkforobsoletes(dsttree, self.marked4moving, test = True)
@@ -432,6 +433,15 @@
                         if arch not in pkg.files.keys():
                             missingarchs.append(arch)
                     pkg.warning('not built for archs: %s' % self.__arch_stringify(missingarchs))
+
+    def __checduplicates(self, marked):
+        """
+        Checks if marked packages contain duplicate packages (with different versions)
+        """
+        for pkg in marked:
+            olderpkgnames = self.__find_older_pkgs(pkg)
+            for i in olderpkgnames:
+                pkg.error('duplicate package: %s' % i)
 
     def __rmolderfromsrc(self, test = False):
         for pkg in self.marked4moving:
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/pld-ftp-admin/modules/ftptree.py?r1=1.48&r2=1.49&f=u



More information about the pld-cvs-commit mailing list