Author: mmazur Date: Tue Aug 9 23:06:29 2005 GMT Module: pld-ftp-admin Tag: HEAD ---- Log message: - added support for pkg pools with mutually exclusive marking (only one pkg in that pool can be marked for moving) - added unmark4moving to Pkg()
---- Files affected: pld-ftp-admin/modules: ftptree.py (1.23 -> 1.24) ---- Diffs: ================================================================ Index: pld-ftp-admin/modules/ftptree.py diff -u pld-ftp-admin/modules/ftptree.py:1.23 pld-ftp-admin/modules/ftptree.py:1.24 --- pld-ftp-admin/modules/ftptree.py:1.23 Mon Aug 8 20:03:56 2005 +++ pld-ftp-admin/modules/ftptree.py Wed Aug 10 01:06:24 2005 @@ -40,6 +40,7 @@ self.release=nvr.split('-')[-1] self.marked4removal=False self.marked4moving=False + self.marked4movingpool=[] self.errors=[] self.warnings=[] @@ -54,8 +55,16 @@ def mark4moving(self): if not self.marked4moving: + # Only one pkg in this pool can be marked for moving + for pkg in self.marked4movingpool: + pkg.unmark4moving() self.tree.marked4moving.append(self) self.marked4moving=True + + def unmark4moving(self): + if self.marked4moving: + self.tree.marked4moving.remove(self) + self.marked4moving=False def mark4removal(self): if not self.marked4removal: ================================================================ ---- CVS-web: http://cvs.pld-linux.org/pld-ftp-admin/modules/ftptree.py?r1=1.23&r2=1.24&f=u _______________________________________________ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit