Mercurial > hg > octave-lojdl
changeset 14637: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 | e3d03b48ecb5 |
children | 5b0872b5b234 |
files | scripts/pkg/private/installed_packages.m scripts/pkg/private/rebuild.m |
diffstat | 2 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/pkg/private/installed_packages.m +++ b/scripts/pkg/private/installed_packages.m @@ -40,11 +40,11 @@ ## Locally installed packages take precedence. dup = []; for i = 1:length (installed_pkgs_lst) - if (find (dup, i)) + if (any (dup == i)) continue; endif for j = (i+1):length (installed_pkgs_lst) - if (find (dup, j)) + if (any (dup == j)) continue; endif if (strcmp (installed_pkgs_lst{i}.name, installed_pkgs_lst{j}.name))
--- a/scripts/pkg/private/rebuild.m +++ b/scripts/pkg/private/rebuild.m @@ -81,11 +81,11 @@ dup = []; for i = 1:length (descriptions) - if (find (dup, i)) + if (any (dup == i)) continue; endif for j = (i+1):length (descriptions) - if (find (dup, j)) + if (any (dup == j)) continue; endif if (strcmp (descriptions{i}.name, descriptions{j}.name))