bugfix: exit unexpectedly if circle exist
authorZhang Qiang <qiang.z.zhang@intel.com>
Fri, 14 Jun 2013 02:13:57 +0000 (10:13 +0800)
committerZhang Qiang <qiang.z.zhang@intel.com>
Fri, 14 Jun 2013 02:13:57 +0000 (10:13 +0800)
 - clean %expansion_errors before assign with %tmp_expansion_errors
 - exist only if @order is empty

Change-Id: Ibe99208be4128f1f56e8c291712031f855e3d0eb

depanneur

index 4f954c00d48bcb125db87b3f67ce886f2a32b05d..fefbc3221695d8cf25146b41d206324b1c82a0ba 100755 (executable)
--- a/depanneur
+++ b/depanneur
@@ -1746,11 +1746,12 @@ while (! $TERM) {
         # as real expansion_errors, and all packages depend on these packages
         # can not be blocked.
         if (@order == 0 && threads->list() == 0 && $dirty == 0) {
+            %expansion_errors = ();
             @expansion_errors{keys %tmp_expansion_errors} = values %tmp_expansion_errors;
-        }
-        if (scalar(keys %to_build) == @done + @skipped +
-            scalar(keys %expansion_errors) && !$dirty) {
-            $TERM = 1;
+            if (scalar(keys %to_build) == @done + @skipped +
+                scalar(keys %expansion_errors) && !$dirty) {
+                $TERM = 1;
+            }
         }
     }