Don't duplicate packages in requiredby list
This is a "fix" for FS#10226. I think that multiple versioned dependencies are quite common now, and the old behavior is quite annoying there. This patch won't cause any slow-down. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
5f701005ed
commit
2122eb1428
|
@ -537,9 +537,7 @@ unsigned short SYMEXPORT alpm_pkg_has_scriptlet(pmpkg_t *pkg)
|
||||||
* @brief Compute the packages requiring a given package.
|
* @brief Compute the packages requiring a given package.
|
||||||
* @param pkg a package
|
* @param pkg a package
|
||||||
* @return the list of packages requiring pkg
|
* @return the list of packages requiring pkg
|
||||||
*
|
*/
|
||||||
* A depends on B through n depends <=> A listed in B's requiredby n times
|
|
||||||
* n == 0 or 1 in almost all cases */
|
|
||||||
alpm_list_t SYMEXPORT *alpm_pkg_compute_requiredby(pmpkg_t *pkg)
|
alpm_list_t SYMEXPORT *alpm_pkg_compute_requiredby(pmpkg_t *pkg)
|
||||||
{
|
{
|
||||||
const alpm_list_t *i, *j;
|
const alpm_list_t *i, *j;
|
||||||
|
@ -560,6 +558,7 @@ alpm_list_t SYMEXPORT *alpm_pkg_compute_requiredby(pmpkg_t *pkg)
|
||||||
_alpm_log(PM_LOG_DEBUG, "adding '%s' in requiredby field for '%s'\n",
|
_alpm_log(PM_LOG_DEBUG, "adding '%s' in requiredby field for '%s'\n",
|
||||||
cachepkgname, pkg->name);
|
cachepkgname, pkg->name);
|
||||||
reqs = alpm_list_add(reqs, strdup(cachepkgname));
|
reqs = alpm_list_add(reqs, strdup(cachepkgname));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue