summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Crane <arc@cpan.org>2016-04-23 11:43:25 +0100
committerAaron Crane <arc@cpan.org>2016-04-23 11:43:25 +0100
commitf8528237b61e7b2bb4b5b5837391a550d4135511 (patch)
treecb65fd2503486d694c58f9a09d3045d2fef37a60
parentb76210c2ef58dc61e2c4731422f7fc44165b1159 (diff)
Don't rely on directory order when locating units
Without this change, it's more likely for different machines to produce a Configure script with spurious unit reorderings (especially if they're running different OSes).
-rw-r--r--mcon/pl/locate.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/mcon/pl/locate.pl b/mcon/pl/locate.pl
index ea7d03f..46c1078 100644
--- a/mcon/pl/locate.pl
+++ b/mcon/pl/locate.pl
@@ -122,7 +122,7 @@ sub units_path {
print "Locating in $MC/$dir...\n" if $main'opt_v;
@contents = readdir DIR; # Slurp the whole thing
closedir DIR; # And close dir, ready for recursion
- foreach (@contents) {
+ foreach (sort @contents) {
next if $_ eq '.' || $_ eq '..';
if (/\.U$/) { # A unit, definitely
($unit_name) = /^(.*)\.U$/;