1
0
Fork 0

Filter duplicate packages

pull/8850/head
Yanick Witschi 2020-05-05 20:27:07 +02:00 committed by Jordi Boggiano
parent bde9502473
commit 26877285ad
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 10 additions and 0 deletions

View File

@ -205,6 +205,16 @@ class PoolBuilder
$this->unacceptableFixedPackages = $prePoolCreateEvent->getUnacceptableFixedPackages();
}
// Filter duplicate packages
$presentPackages = array();
foreach ($this->packages as $i => $package) {
if (isset($presentPackages[$package->getUniqueName()])) {
unset($this->packages[$i]);
} else {
$presentPackages[$package->getUniqueName()] = true;
}
}
$pool = new Pool($this->packages, $this->unacceptableFixedPackages);
$this->aliasMap = array();