do not list optional deps in orphans

Este commit está contenido en:
guinux 2015-10-09 10:17:34 +02:00
padre 00fd98ae27
commit 31c0625b7a
Se han modificado 1 ficheros con 8 adiciones y 4 borrados

Ver fichero

@ -382,11 +382,15 @@ namespace Pamac {
Pamac.Package[] pkgs = {};
foreach (var alpm_pkg in alpm_config.handle.localdb.pkgcache) {
if (alpm_pkg.reason == Alpm.Package.Reason.DEPEND) {
Alpm.List<string?> *list = alpm_pkg.compute_requiredby ();
if (list->length == 0) {
pkgs += Pamac.Package (alpm_pkg, null);
Alpm.List<string?> *requiredby = alpm_pkg.compute_requiredby ();
if (requiredby->length == 0) {
Alpm.List<string?> *optionalfor = alpm_pkg.compute_optionalfor ();
if (optionalfor->length == 0) {
pkgs += Pamac.Package (alpm_pkg, null);
}
Alpm.List.free_all (optionalfor);
}
Alpm.List.free_all (list);
Alpm.List.free_all (requiredby);
}
}
return pkgs;