forked from cromer/pamac-classic
fix a bug in check_extra_modules
This commit is contained in:
parent
c54dafc30c
commit
c9cfcac8d0
@ -528,19 +528,19 @@ class PamacDBusService(dbus.service.Object):
|
||||
# check if the current pkg is a kernel and if so, check if a module is required to install
|
||||
match = re.match("(linux[0-9]{2,3})(.*)", pkg.name)
|
||||
if match:
|
||||
if not match.group(2):
|
||||
if not match.group(2): # match pkg is a kernel
|
||||
for module in installed_modules:
|
||||
pkgname = match.group(1) + module
|
||||
if not localdb.get_pkg(pkgname):
|
||||
for db in syncdbs:
|
||||
pkg = db.get_pkg(pkgname)
|
||||
if pkg:
|
||||
if not pkg.name in already_checked:
|
||||
depends[i+1].append(pkg)
|
||||
already_checked.add(pkg.name)
|
||||
if not pkg.name in to_add | to_remove:
|
||||
to_add.add(pkg.name)
|
||||
self.t.add_pkg(pkg)
|
||||
_pkg = db.get_pkg(pkgname)
|
||||
if _pkg:
|
||||
if not _pkg.name in already_checked:
|
||||
depends[i+1].append(_pkg)
|
||||
already_checked.add(_pkg.name)
|
||||
if not _pkg.name in to_add | to_remove:
|
||||
to_add.add(_pkg.name)
|
||||
self.t.add_pkg(_pkg)
|
||||
break
|
||||
# check if the current pkg is a kernel module and if so, install it for all installed kernels
|
||||
match = re.match("(linux[0-9]{2,3})(.*-modules)", pkg.name)
|
||||
@ -549,14 +549,14 @@ class PamacDBusService(dbus.service.Object):
|
||||
pkgname = kernel + match.group(2)
|
||||
if not localdb.get_pkg(pkgname):
|
||||
for db in syncdbs:
|
||||
pkg = db.get_pkg(pkgname)
|
||||
if pkg:
|
||||
if not pkg.name in already_checked:
|
||||
depends[i+1].append(pkg)
|
||||
already_checked.add(pkg.name)
|
||||
if not pkg.name in to_add | to_remove:
|
||||
to_add.add(pkg.name)
|
||||
self.t.add_pkg(pkg)
|
||||
_pkg = db.get_pkg(pkgname)
|
||||
if _pkg:
|
||||
if not _pkg.name in already_checked:
|
||||
depends[i+1].append(_pkg)
|
||||
already_checked.add(_pkg.name)
|
||||
if not _pkg.name in to_add | to_remove:
|
||||
to_add.add(_pkg.name)
|
||||
self.t.add_pkg(_pkg)
|
||||
break
|
||||
for depend in pkg.depends:
|
||||
found_depend = pyalpm.find_satisfier(localdb.pkgcache, depend)
|
||||
|
@ -275,10 +275,10 @@ def finalize():
|
||||
progress_buffer.delete(progress_buffer.get_start_iter(), progress_buffer.get_end_iter())
|
||||
ProgressCancelButton.set_visible(True)
|
||||
ProgressCloseButton.set_visible(False)
|
||||
#~ try:
|
||||
try:
|
||||
Commit()
|
||||
#~ except dbus.exceptions.DBusException as e:
|
||||
#~ handle_error(str(e))
|
||||
except dbus.exceptions.DBusException as e:
|
||||
Release()
|
||||
while Gtk.events_pending():
|
||||
Gtk.main_iteration()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user