[Piuparts-devel] piuparts-master 'state' command (was: Re: setting priority of sections)

Holger Levsen holger at layer-acht.org
Sun Nov 27 16:23:26 UTC 2011


Hi Andreas,

On Sonntag, 27. November 2011, Andreas Beckmann wrote:
> Documentatation added.

thanks!
 
> two (stacked) branches are available:
> 
> cleanup/readme-changelog

merged, thanks!

> feature/master/state-command
>   (depends on the reshuffled changelog)

+    def _status(self, command, args):
+        self._check_args(0, command, args)
+        stats = ""
+        total = 0
+        for state in self._binary_db.get_states():
+            count = len(self._binary_db.get_packages_in_state(state))
+            total += count
+            stats += "%s=%d " % (state, count)
+        stats += "total=%d" % total
+        self._short_response("ok", stats)
+
+    def _status(self, command, args):
+        self._check_args(0, command, args)
+        stats = ""
+        total = 0
+        for state in self._binary_db.get_states():
+            count = len(self._binary_db.get_packages_in_state(state))
+            total += count
+            stats += "%s=%d " % (state, count)
+        stats += "total=%d" % total
+        self._short_response("ok", stats)
+

doesnt look right to me…


cheers,
	Holger



More information about the Piuparts-devel mailing list