diff options
author | elliott_c <ocielliottc@users.noreply.github.com> | 2003-08-07 12:36:33 +0000 |
---|---|---|
committer | elliott_c <ocielliottc@users.noreply.github.com> | 2003-08-07 12:36:33 +0000 |
commit | dd05ad66055f636aba524cab72013d2fe344d08b (patch) | |
tree | 4c91fe112fa2e281595b9e4232f7d497cd5f4ca3 | |
parent | e920e5035365c3e0889cdb1f8431306a4f2df51c (diff) | |
download | ATCD-dd05ad66055f636aba524cab72013d2fe344d08b.tar.gz |
ChangeLogTag: Thu Aug 7 07:35:56 2003 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | bin/MakeProjectCreator/modules/WorkspaceCreator.pm | 12 |
2 files changed, 16 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog index 98f0521f7bf..55daae5eeec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Thu Aug 7 07:35:56 2003 Chad Elliott <elliott_c@ociweb.com> + + * bin/MakeProjectCreator/modules/WorkspaceCreator.pm: + + Corrected a bug in the dependency sorting logic by removing the + use of splice and manually moving the array entries. + Thu Aug 7 06:18:57 2003 Chad Elliott <elliott_c@ociweb.com> * include/makeinclude/rules.local.GNU: diff --git a/bin/MakeProjectCreator/modules/WorkspaceCreator.pm b/bin/MakeProjectCreator/modules/WorkspaceCreator.pm index b2f7cf1f1d4..93228a55f3d 100644 --- a/bin/MakeProjectCreator/modules/WorkspaceCreator.pm +++ b/bin/MakeProjectCreator/modules/WorkspaceCreator.pm @@ -763,9 +763,15 @@ sub sort_dependencies { ## See if the dependency is listed after this project for(my $j = $i; $j <= $#list; $j++) { if ($list[$j] eq $full && $i != $j) { - ## If so, move it in front of the current project - splice(@list, $i, 0, $full); - splice(@list, $j + 1, 1); + ## If so, move it in front of the current project. + ## The original code, which had splices, didn't always + ## work correctly (especially on AIX for some reason). + for(my $k = $j; $k > $i; --$k) { + $list[$k] = $list[$k - 1]; + } + $list[$i] = $full; + + ## Mark that an entry has been moved $moved = 1; $j--; } |