fix kernel modules detection

This commit is contained in:
guinux 2017-08-04 15:10:43 +02:00
parent fe4f6a4102
commit 4773afb494

View File

@ -948,11 +948,14 @@ namespace Pamac {
// add the same module for other installed kernels // add the same module for other installed kernels
foreach (unowned string installed_kernel in installed_kernels) { foreach (unowned string installed_kernel in installed_kernels) {
string module = installed_kernel + "-" + splitted[1]; string module = installed_kernel + "-" + splitted[1];
unowned Alpm.Package? installed_module_pkg = alpm_handle.localdb.get_pkg (module);
if (installed_module_pkg == null) {
unowned Alpm.Package? module_pkg = get_syncpkg (module); unowned Alpm.Package? module_pkg = get_syncpkg (module);
if (module_pkg != null) { if (module_pkg != null) {
trans_add_pkg_real (module_pkg); trans_add_pkg_real (module_pkg);
} }
} }
}
} else if (splitted.length == 1) { } else if (splitted.length == 1) {
// we are adding a kernel // we are adding a kernel
// add all installed modules for other kernels // add all installed modules for other kernels