rpm-software-management / dnf5

Next-generation RPM package management system
Other
256 stars 86 forks source link

dnf5daemon: transaction_action_start transaction_action_progress and transaction_action_stop - meaning of argument "total" #1682

Open anaselli opened 2 months ago

anaselli commented 2 months ago

I'm using libdnf5 5.2.4.0 on mageia linux cauldron, using python dnfdaemon for dnfdragora.

I mapped the following signals: transaction_action_start to on_TransactionActionStart transaction_action_progress to on_TransactionActionProgress transaction_action_stop to on_TransactionActionStop It is not clear to me what the arg total in those signals represent. To understand what i mean I add below a part of an update transaction log:

2024-09-08 11:04:37,749 [dnfdaemon.client]{dnfd_client.py:722}(DEBUG) on_TransactionActionStart ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('lib64ncurses6-0:6.5-20240831.1.mga10.x86_64'), dbus.UInt32(2), dbus.UInt64(624352)))
2024-09-08 11:04:37,749 [dnfdaemon.client]{dnfd_client.py:741}(DEBUG) on_TransactionActionProgress ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('lib64ncurses6-0:6.5-20240831.1.mga10.x86_64'), dbus.UInt64(0), dbus.UInt64(624352)))
2024-09-08 11:04:37,765 [dnfdaemon.client]{dnfd_client.py:759}(DEBUG) on_TransactionActionStop ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('lib64ncurses6-0:6.5-20240831.1.mga10.x86_64'), dbus.UInt64(624352)))
2024-09-08 11:04:37,897 [dnfdaemon.client]{dnfd_client.py:722}(DEBUG) on_TransactionActionStart ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('lib64ncursesw6-0:6.5-20240831.1.mga10.x86_64'), dbus.UInt32(2), dbus.UInt64(413168)))
2024-09-08 11:04:37,900 [dnfdaemon.client]{dnfd_client.py:759}(DEBUG) on_TransactionActionStop ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('lib64ncursesw6-0:6.5-20240831.1.mga10.x86_64'), dbus.UInt64(413168)))
2024-09-08 11:04:37,969 [dnfdaemon.client]{dnfd_client.py:722}(DEBUG) on_TransactionActionStart ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('lib64ncursesw++6-0:6.5-20240831.1.mga10.x86_64'), dbus.UInt32(2), dbus.UInt64(86756)))
2024-09-08 11:04:37,970 [dnfdaemon.client]{dnfd_client.py:759}(DEBUG) on_TransactionActionStop ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('lib64ncursesw++6-0:6.5-20240831.1.mga10.x86_64'), dbus.UInt64(86756)))
2024-09-08 11:04:38,042 [dnfdaemon.client]{dnfd_client.py:722}(DEBUG) on_TransactionActionStart ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('lib64ncurses++6-0:6.5-20240831.1.mga10.x86_64'), dbus.UInt32(2), dbus.UInt64(86752)))
2024-09-08 11:04:38,042 [dnfdaemon.client]{dnfd_client.py:759}(DEBUG) on_TransactionActionStop ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('lib64ncurses++6-0:6.5-20240831.1.mga10.x86_64'), dbus.UInt64(86752)))
2024-09-08 11:04:38,119 [dnfdaemon.client]{dnfd_client.py:722}(DEBUG) on_TransactionActionStart ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('lib64ncurses-devel-0:6.5-20240831.1.mga10.x86_64'), dbus.UInt32(2), dbus.UInt64(5752272)))
2024-09-08 11:04:38,158 [dnfdaemon.client]{dnfd_client.py:741}(DEBUG) on_TransactionActionProgress ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('lib64ncurses-devel-0:6.5-20240831.1.mga10.x86_64'), dbus.UInt64(268975), dbus.UInt64(5752272)))
2024-09-08 11:04:38,342 [dnfdaemon.client]{dnfd_client.py:759}(DEBUG) on_TransactionActionStop ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('lib64ncurses-devel-0:6.5-20240831.1.mga10.x86_64'), dbus.UInt64(5752272)))
2024-09-08 11:04:38,572 [dnfdaemon.client]{dnfd_client.py:722}(DEBUG) on_TransactionActionStart ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('lib64rados2-0:19.1.1-2.mga10.x86_64'), dbus.UInt32(2), dbus.UInt64(16003452)))
2024-09-08 11:04:38,572 [dnfdaemon.client]{dnfd_client.py:741}(DEBUG) on_TransactionActionProgress ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('lib64rados2-0:19.1.1-2.mga10.x86_64'), dbus.UInt64(0), dbus.UInt64(16003452)))
2024-09-08 11:04:38,634 [dnfdaemon.client]{dnfd_client.py:759}(DEBUG) on_TransactionActionStop ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('lib64rados2-0:19.1.1-2.mga10.x86_64'), dbus.UInt64(16003452)))
2024-09-08 11:04:39,138 [dnfdaemon.client]{dnfd_client.py:722}(DEBUG) on_TransactionActionStart ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('perl-MIME-Base32-0:1.303.0-5.mga9.noarch'), dbus.UInt32(0), dbus.UInt64(17044)))
2024-09-08 11:04:39,138 [dnfdaemon.client]{dnfd_client.py:741}(DEBUG) on_TransactionActionProgress ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('perl-MIME-Base32-0:1.303.0-5.mga9.noarch'), dbus.UInt64(0), dbus.UInt64(17044)))
2024-09-08 11:04:39,139 [dnfdaemon.client]{dnfd_client.py:759}(DEBUG) on_TransactionActionStop ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('perl-MIME-Base32-0:1.303.0-5.mga9.noarch'), dbus.UInt64(17044)))
2024-09-08 11:04:39,583 [dnfdaemon.client]{dnfd_client.py:722}(DEBUG) on_TransactionActionStart ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('perl-URI-0:5.290.0-1.mga10.noarch'), dbus.UInt32(2), dbus.UInt64(330348)))
2024-09-08 11:04:39,583 [dnfdaemon.client]{dnfd_client.py:741}(DEBUG) on_TransactionActionProgress ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('perl-URI-0:5.290.0-1.mga10.noarch'), dbus.UInt64(0), dbus.UInt64(330348)))
2024-09-08 11:04:39,624 [dnfdaemon.client]{dnfd_client.py:759}(DEBUG) on_TransactionActionStop ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('perl-URI-0:5.290.0-1.mga10.noarch'), dbus.UInt64(330348)))
2024-09-08 11:04:39,817 [dnfdaemon.client]{dnfd_client.py:722}(DEBUG) on_TransactionActionStart ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('lib64rbd1-0:19.1.1-2.mga10.x86_64'), dbus.UInt32(2), dbus.UInt64(10592596)))
2024-09-08 11:04:39,882 [dnfdaemon.client]{dnfd_client.py:759}(DEBUG) on_TransactionActionStop ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('lib64rbd1-0:19.1.1-2.mga10.x86_64'), dbus.UInt64(10592596)))
2024-09-08 11:04:40,020 [dnfdaemon.client]{dnfd_client.py:722}(DEBUG) on_TransactionActionStart ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('lib64ncursesw-devel-0:6.5-20240831.1.mga10.x86_64'), dbus.UInt32(2), dbus.UInt64(6920)))
2024-09-08 11:04:40,020 [dnfdaemon.client]{dnfd_client.py:741}(DEBUG) on_TransactionActionProgress ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('lib64ncursesw-devel-0:6.5-20240831.1.mga10.x86_64'), dbus.UInt64(0), dbus.UInt64(6920)))
2024-09-08 11:04:40,031 [dnfdaemon.client]{dnfd_client.py:759}(DEBUG) on_TransactionActionStop ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('lib64ncursesw-devel-0:6.5-20240831.1.mga10.x86_64'), dbus.UInt64(6920)))
2024-09-08 11:04:40,101 [dnfdaemon.client]{dnfd_client.py:722}(DEBUG) on_TransactionActionStart ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('nano-0:8.2-1.mga10.x86_64'), dbus.UInt32(2), dbus.UInt64(2971344)))
2024-09-08 11:04:40,119 [dnfdaemon.client]{dnfd_client.py:759}(DEBUG) on_TransactionActionStop ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('nano-0:8.2-1.mga10.x86_64'), dbus.UInt64(2971344)))
2024-09-08 11:04:40,215 [dnfdaemon.client]{dnfd_client.py:722}(DEBUG) on_TransactionActionStart ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('ncurses-0:6.5-20240831.1.mga10.x86_64'), dbus.UInt32(2), dbus.UInt64(559668)))
2024-09-08 11:04:40,240 [dnfdaemon.client]{dnfd_client.py:759}(DEBUG) on_TransactionActionStop ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('ncurses-0:6.5-20240831.1.mga10.x86_64'), dbus.UInt64(559668)))
2024-09-08 11:04:40,555 [dnfdaemon.client]{dnfd_client.py:722}(DEBUG) on_TransactionActionStart ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('lib64ncursesw-devel-0:6.5-20240713.1.mga10.x86_64'), dbus.UInt32(1), dbus.UInt64(30)))
2024-09-08 11:04:40,556 [dnfdaemon.client]{dnfd_client.py:741}(DEBUG) on_TransactionActionProgress ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('lib64ncursesw-devel-0:6.5-20240713.1.mga10.x86_64'), dbus.UInt64(0), dbus.UInt64(30)))
2024-09-08 11:04:40,556 [dnfdaemon.client]{dnfd_client.py:759}(DEBUG) on_TransactionActionStop ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('lib64ncursesw-devel-0:6.5-20240713.1.mga10.x86_64'), dbus.UInt64(30)))
2024-09-08 11:04:43,676 [dnfdaemon.client]{dnfd_client.py:722}(DEBUG) on_TransactionActionStart ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('lib64ncursesw++6-0:6.5-20240713.1.mga10.x86_64'), dbus.UInt32(1), dbus.UInt64(5)))
2024-09-08 11:04:43,678 [dnfdaemon.client]{dnfd_client.py:741}(DEBUG) on_TransactionActionProgress ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('lib64ncursesw++6-0:6.5-20240713.1.mga10.x86_64'), dbus.UInt64(0), dbus.UInt64(5)))
2024-09-08 11:04:43,679 [dnfdaemon.client]{dnfd_client.py:759}(DEBUG) on_TransactionActionStop ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('lib64ncursesw++6-0:6.5-20240713.1.mga10.x86_64'), dbus.UInt64(5)))
2024-09-08 11:04:44,079 [dnfdaemon.client]{dnfd_client.py:722}(DEBUG) on_TransactionActionStart ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('lib64rbd1-0:18.2.2-4.mga10.x86_64'), dbus.UInt32(1), dbus.UInt64(9)))
2024-09-08 11:04:44,080 [dnfdaemon.client]{dnfd_client.py:741}(DEBUG) on_TransactionActionProgress ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('lib64rbd1-0:18.2.2-4.mga10.x86_64'), dbus.UInt64(0), dbus.UInt64(9)))
2024-09-08 11:04:44,080 [dnfdaemon.client]{dnfd_client.py:759}(DEBUG) on_TransactionActionStop ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('lib64rbd1-0:18.2.2-4.mga10.x86_64'), dbus.UInt64(9)))
2024-09-08 11:04:45,202 [dnfdaemon.client]{dnfd_client.py:722}(DEBUG) on_TransactionActionStart ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('lib64ncurses-devel-0:6.5-20240713.1.mga10.x86_64'), dbus.UInt32(1), dbus.UInt64(1243)))
2024-09-08 11:04:45,203 [dnfdaemon.client]{dnfd_client.py:741}(DEBUG) on_TransactionActionProgress ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('lib64ncurses-devel-0:6.5-20240713.1.mga10.x86_64'), dbus.UInt64(0), dbus.UInt64(1243)))
2024-09-08 11:04:45,204 [dnfdaemon.client]{dnfd_client.py:759}(DEBUG) on_TransactionActionStop ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('lib64ncurses-devel-0:6.5-20240713.1.mga10.x86_64'), dbus.UInt64(1243)))
2024-09-08 11:04:45,534 [dnfdaemon.client]{dnfd_client.py:722}(DEBUG) on_TransactionActionStart ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('lib64ncurses++6-0:6.5-20240713.1.mga10.x86_64'), dbus.UInt32(1), dbus.UInt64(5)))
2024-09-08 11:04:45,535 [dnfdaemon.client]{dnfd_client.py:759}(DEBUG) on_TransactionActionStop ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('lib64ncurses++6-0:6.5-20240713.1.mga10.x86_64'), dbus.UInt64(5)))
2024-09-08 11:04:46,918 [dnfdaemon.client]{dnfd_client.py:722}(DEBUG) on_TransactionActionStart ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('ncurses-0:6.5-20240713.1.mga10.x86_64'), dbus.UInt32(1), dbus.UInt64(140)))
2024-09-08 11:04:46,919 [dnfdaemon.client]{dnfd_client.py:741}(DEBUG) on_TransactionActionProgress ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('ncurses-0:6.5-20240713.1.mga10.x86_64'), dbus.UInt64(0), dbus.UInt64(140)))
2024-09-08 11:04:46,919 [dnfdaemon.client]{dnfd_client.py:759}(DEBUG) on_TransactionActionStop ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('ncurses-0:6.5-20240713.1.mga10.x86_64'), dbus.UInt64(140)))
2024-09-08 11:04:48,275 [dnfdaemon.client]{dnfd_client.py:722}(DEBUG) on_TransactionActionStart ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('nano-0:8.1-1.mga10.x86_64'), dbus.UInt32(1), dbus.UInt64(108)))
2024-09-08 11:04:48,275 [dnfdaemon.client]{dnfd_client.py:741}(DEBUG) on_TransactionActionProgress ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('nano-0:8.1-1.mga10.x86_64'), dbus.UInt64(0), dbus.UInt64(108)))
2024-09-08 11:04:48,275 [dnfdaemon.client]{dnfd_client.py:759}(DEBUG) on_TransactionActionStop ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('nano-0:8.1-1.mga10.x86_64'), dbus.UInt64(108)))
2024-09-08 11:04:48,347 [dnfdaemon.client]{dnfd_client.py:722}(DEBUG) on_TransactionActionStart ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('perl-URI-0:5.280.0-1.mga10.noarch'), dbus.UInt32(1), dbus.UInt64(81)))
2024-09-08 11:04:48,348 [dnfdaemon.client]{dnfd_client.py:759}(DEBUG) on_TransactionActionStop ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('perl-URI-0:5.280.0-1.mga10.noarch'), dbus.UInt64(81)))
2024-09-08 11:04:49,494 [dnfdaemon.client]{dnfd_client.py:722}(DEBUG) on_TransactionActionStart ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('lib64ncursesw6-0:6.5-20240713.1.mga10.x86_64'), dbus.UInt32(1), dbus.UInt64(17)))
2024-09-08 11:04:49,495 [dnfdaemon.client]{dnfd_client.py:741}(DEBUG) on_TransactionActionProgress ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('lib64ncursesw6-0:6.5-20240713.1.mga10.x86_64'), dbus.UInt64(0), dbus.UInt64(17)))
2024-09-08 11:04:49,495 [dnfdaemon.client]{dnfd_client.py:759}(DEBUG) on_TransactionActionStop ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('lib64ncursesw6-0:6.5-20240713.1.mga10.x86_64'), dbus.UInt64(17)))
2024-09-08 11:04:49,563 [dnfdaemon.client]{dnfd_client.py:722}(DEBUG) on_TransactionActionStart ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('lib64ncurses6-0:6.5-20240713.1.mga10.x86_64'), dbus.UInt32(1), dbus.UInt64(24)))
2024-09-08 11:04:49,564 [dnfdaemon.client]{dnfd_client.py:759}(DEBUG) on_TransactionActionStop ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('lib64ncurses6-0:6.5-20240713.1.mga10.x86_64'), dbus.UInt64(24)))
2024-09-08 11:04:49,632 [dnfdaemon.client]{dnfd_client.py:722}(DEBUG) on_TransactionActionStart ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('lib64rados2-0:18.2.2-4.mga10.x86_64'), dbus.UInt32(1), dbus.UInt64(14)))
2024-09-08 11:04:49,633 [dnfdaemon.client]{dnfd_client.py:759}(DEBUG) on_TransactionActionStop ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('lib64rados2-0:18.2.2-4.mga10.x86_64'), dbus.UInt64(14)))

As you can see last argument is changing and it is the same only for the three (or two if no progress signal is present) nearest sequence. So what does total value stand for?

anaselli commented 2 months ago

Also transaction_action_progress "processed" argument need to be explained a bit, i cannot see any progress with that value higher than 0, and never more than one progress signal received.

2024-09-08 11:04:49,495 [dnfdaemon.client]{dnfd_client.py:741}(DEBUG) on_TransactionActionProgress ((dbus.String('/org/rpm/dnf/v0/91626f3ac2664ea24d755d1080ee0d82'), dbus.String('lib64ncursesw6-0:6.5-20240713.1.mga10.x86_64'), dbus.UInt64(0), dbus.UInt64(17)))

m-blaha commented 2 months ago

transaction_action_* signals are equivalent to the rpm transaction callbacks (un)install_*. See their documentation here: https://dnf5.readthedocs.io/en/latest/api/c%2B%2B/libdnf5_rpm_transaction_callbacks.html. In this context, total refers to the installed size of the package being installed or removed. For D-Bus signals, there is a hardcoded limit that prevents sending more than one signal every 400 milliseconds to avoid overwhelming the user or D-Bus with excessive signals. However, you should see some progress for very large packages. processed indicates the portion of the package that rpm has reported as installed so far. I will update the signal descriptions to make this clearer.

anaselli commented 2 months ago

Now it's clearer, thanks! i'm not sure Progress with 0 gives a valid information, but it's clear :)