Skip to content
Permalink
Browse files

fix possibility of duplicates in configure.universal_archs

git-svn-id: https://svn.macports.org/repository/macports/trunk/base@68764 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
jmroot committed Jun 12, 2010
1 parent fb098f1 commit 2c1e1ddfcba9fbe8c38844c5e862fcd9ea89e487
Showing with 10 additions and 5 deletions.
  1. +10 −5 src/port1.0/portconfigure.tcl
@@ -226,11 +226,16 @@ proc portconfigure::choose_supported_archs {archs} {
set ret {}
foreach arch $archs {
if {[lsearch -exact $supported_archs $arch] != -1} {
lappend ret $arch
} elseif {$arch == "x86_64" && [lsearch -exact $supported_archs "i386"] != -1 && [lsearch -exact $ret "i386"] == -1} {
lappend ret "i386"
} elseif {$arch == "ppc64" && [lsearch -exact $supported_archs "ppc"] != -1 && [lsearch -exact $ret "ppc"] == -1} {
lappend ret "ppc"
set add_arch $arch
} elseif {$arch == "x86_64" && [lsearch -exact $supported_archs "i386"] != -1} {
set add_arch "i386"
} elseif {$arch == "ppc64" && [lsearch -exact $supported_archs "ppc"] != -1} {
set add_arch "ppc"
} else {
continue
}
if {[lsearch -exact $ret $add_arch] == -1} {
lappend ret $add_arch
}
}
return $ret

0 comments on commit 2c1e1dd

Please sign in to comment.
You can’t perform that action at this time.