Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Request #19299 Fix failing test

  • Loading branch information...
commit 028ff96db231a8286bf95b4cda1ab5b785fac528 1 parent de04ccd
@CloCkWeRX CloCkWeRX authored
Showing with 6 additions and 6 deletions.
  1. +6 −6 PEAR/Command/Packaging.php
View
12 PEAR/Command/Packaging.php
@@ -729,20 +729,20 @@ function _generatePackageDeps($pf)
if ($dep['rel'] == 'has') {
// We use $package as the index to the $requires array to de-duplicate deps.
// Note that in the case of duplicate deps, versioned deps will "win" - see several lines down.
- $requires[$package] = $package;
+ $requires[] = $package;
} elseif ($dep['rel'] == 'not') {
$conflicts[] = $package;
} elseif ($dep['rel'] == 'ne') {
$conflicts[] = $package . ' = ' . $dep['version'];
} elseif (isset($trans[$dep['rel']])) {
- $requires[$package] = $package . ' ' . $trans[$dep['rel']] . ' ' . $dep['version'];
+ $requires[] = $package . ' ' . $trans[$dep['rel']] . ' ' . $dep['version'];
}
}
if (count($requires)) {
- $this->_output['extra_headers'] .= $this->_formatRpmHeader('Requires', implode(', ', $requires)) . "\n";
+ $this->_output['extra_headers'] .= $this->_formatRpmHeader('Requires', implode(', ', array_unique($requires))) . "\n";
}
if (count($conflicts)) {
- $this->_output['extra_headers'] .= $this->_formatRpmHeader('Conflicts', implode(', ', $conflicts)) . "\n";
+ $this->_output['extra_headers'] .= $this->_formatRpmHeader('Conflicts', implode(', ', array_unique($conflicts))) . "\n";
}
} else {
$this->_output['package2xml'] = '2'; // tell the spec to use package2.xml
@@ -879,12 +879,12 @@ function _generatePackageDeps($pf)
$deps['required']['pearinstaller']['min'];
}
if (count($requires)) {
- foreach($requires as $req) {
+ foreach(array_unique($requires) as $req) {
$this->_output['extra_headers'] .= $this->_formatRpmHeader('Requires', $req) . "\n";
}
}
if (count($conflicts)) {
- $this->_output['extra_headers'] .= $this->_formatRpmHeader('Conflicts', implode(', ', $conflicts)) . "\n";
+ $this->_output['extra_headers'] .= $this->_formatRpmHeader('Conflicts', implode(', ', array_unique($conflicts))) . "\n";
}
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.