Mercurial > hg > octave-max
comparison scripts/pkg/private/rebuild.m @ 14645:e12a0ac530b4
Fix handling of duplicate packages
* scripts/pkg/private/installed_packages.m, scripts/pkg/private/rebuild.m:
Fix comparison against list of duplicate packages.
author | Mike Miller <mtmiller@ieee.org> |
---|---|
date | Wed, 16 May 2012 08:12:32 -0400 |
parents | 05b59be209ed |
children | 5d3a684236b0 |
comparison
equal
deleted
inserted
replaced
14642:e3d03b48ecb5 | 14645:e12a0ac530b4 |
---|---|
79 ## care to keep the other untouched packages in the descriptions | 79 ## care to keep the other untouched packages in the descriptions |
80 descriptions = {descriptions{:}, old_descriptions{:}}; | 80 descriptions = {descriptions{:}, old_descriptions{:}}; |
81 | 81 |
82 dup = []; | 82 dup = []; |
83 for i = 1:length (descriptions) | 83 for i = 1:length (descriptions) |
84 if (find (dup, i)) | 84 if (any (dup == i)) |
85 continue; | 85 continue; |
86 endif | 86 endif |
87 for j = (i+1):length (descriptions) | 87 for j = (i+1):length (descriptions) |
88 if (find (dup, j)) | 88 if (any (dup == j)) |
89 continue; | 89 continue; |
90 endif | 90 endif |
91 if (strcmp (descriptions{i}.name, descriptions{j}.name)) | 91 if (strcmp (descriptions{i}.name, descriptions{j}.name)) |
92 dup = [dup, j]; | 92 dup = [dup, j]; |
93 endif | 93 endif |