manatools / dnfdaemon

DBus daemon for doing package action with the dnf package manager
GNU General Public License v2.0
12 stars 16 forks source link

Don't return Weak dependencies in updates #49

Closed timlau closed 3 years ago

timlau commented 3 years ago

weak dependencies is currently shown when getting updates, this gives errors when trying to add them to the transaction

g-io-error-quark: GDBus.Error:org.freedesktop.DBus.Python.dnf.exceptions.MarkingError: Traceback (most recent call last):
  File "/usr/lib64/python3.9/site-packages/dbus/service.py", line 711, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/lib/python3.9/site-packages/dnfdaemon/server/__init__.py", line 68, in newFunc
    rc = func(*args, **kwargs)
  File "/usr/share/dnfdaemon/dnfdaemon-system", line 488, in AddTransaction
    value = self.add_transaction(pkg_id, action)
  File "/usr/lib/python3.9/site-packages/dnfdaemon/server/__init__.py", line 566, in add_transaction
    rc = self.base.package_upgrade(po)
  File "/usr/lib/python3.9/site-packages/dnf/base.py", line 2074, in package_upgrade
    raise dnf.exceptions.MarkingError(
dnf.exceptions.MarkingError: No match for argument: Packages/f/fedora-packager-kerberos-0.6.0.6-2.fc34.noarch.rpm: fedora-packager-kerberos
 (36)
Conan-Kudo commented 3 years ago

@timlau I think @papoteur-mga is trying to add support for weak deps in #45, does that help for your case?

timlau commented 3 years ago

Nope, He is working on returning weak dependencies in the transaction result

My PR is to fix an error, when return GetPackages('updates') that should return only updates & installonly packages like kernel and not weak dependencies. When we are executing the transaction, then weak dependencies is pulled in and #45 will make it possible to show these packages as weak depencies and not just like packages being installed.

timlau commented 3 years ago

found another case to error. updates with new dependencies, will have these list when getting a list of updates, but give a marking error when they are added to transaction because they are not direct updates and don't update anything.

The changes will not break anything, it will only remove packages there are not reel updates for the list of available updates. returned by GetPackages('updates').

The dependencies will be pulled in when we do the transactions, as they are supposed to do,

timlau commented 3 years ago

Looks like PyCharm as fixed some wrong indentation in the file also, there is include in the patch also

anaselli commented 3 years ago

@timlau @Conan-Kudo if you both agreed we can add @timlau back to push rights. Maybe just opening an issue against dnfdragora when something pushed could break compatibility.

Conan-Kudo commented 3 years ago

Fine with me.