pld-ftp-admin: modules/ftptree.py - print arch list in stbr acceptable form

glen glen at pld-linux.org
Sat Sep 11 12:38:29 CEST 2010


Author: glen                         Date: Sat Sep 11 10:38:29 2010 GMT
Module: pld-ftp-admin                 Tag: HEAD
---- Log message:
- print arch list in stbr acceptable form

---- Files affected:
pld-ftp-admin/modules:
   ftptree.py (1.44 -> 1.45) 

---- Diffs:

================================================================
Index: pld-ftp-admin/modules/ftptree.py
diff -u pld-ftp-admin/modules/ftptree.py:1.44 pld-ftp-admin/modules/ftptree.py:1.45
--- pld-ftp-admin/modules/ftptree.py:1.44	Mon Mar 29 21:31:03 2010
+++ pld-ftp-admin/modules/ftptree.py	Sat Sep 11 12:38:24 2010
@@ -328,6 +328,13 @@
         
 
     # Internal functions below
+    def __arch_stringify(self, list):
+        ret = []
+        # XXX: is dist line in any config?
+        dist = 'ac'
+        for arch in list:
+            ret.append(dist + '-' + arch)
+        return ' '.join(ret)
 
     def __loadpkgnames(self):
         def checkfiletype(name):
@@ -399,7 +406,7 @@
                     if arch not in pkg.files.keys():
                         missingarchs.append(arch)
                 if missingarchs:
-                    pkg.error('moving would remove archs: %s' % missingarchs)
+                    pkg.error('moving would remove archs: %s' % self.__arch_stringify(missingarchs))
             else:
                 # warn if a package isn't built for all archs
                 if (config.separate_noarch and 'noarch' in pkg.files.keys() and len(pkg.files.keys()) == 2):
@@ -409,7 +416,7 @@
                     for arch in config.ftp_archs:
                         if arch not in pkg.files.keys():
                             missingarchs.append(arch)
-                    pkg.warning('not built for archs: %s' % missingarchs)
+                    pkg.warning('not built for archs: %s' % self.__arch_stringify(missingarchs))
 
     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.44&r2=1.45&f=u



More information about the pld-cvs-commit mailing list