Closed kontura closed 5 months ago
Unfortunaly this means that the reinstall action is reported twice to the clients (one install and one uninstall).
Does this mean that the package is mentioned twice in the transaction table?
Unfortunaly this means that the reinstall action is reported twice to the clients (one install and one uninstall).
Does this mean that the package is mentioned twice in the transaction table?
It looks like this:
Downloading metadata...
Downloading metadata...
Downloading metadata...
Package Repository Size
Reinstalling:
bash-5.2.26-3.fc40.x86_64 fedora 1.9 MB
replacing bash-5.2.26-3.fc40.x86_64
Transaction Summary:
Installing: 0 packages
Reinstalling: 1 packages
Upgrading: 0 packages
Obsoleting: 0 packages
Removing: 0 packages
Downgrading: 0 packages
Is this ok [y/N]: y
Downloading packages...
Running transaction test...
Installing: bash;5.2.26-3.fc40;x86_64;fedora
Removing: bash;5.2.26-3.fc40;x86_64;fedora
Complete.
Before instead of:
Installing: bash;5.2.26-3.fc40;x86_64;fedora
Removing: bash;5.2.26-3.fc40;x86_64;fedora
there was just:
Reinstalling: bash;5.2.26-3.fc40;x86_64;fedora
Unfortunaly this means that the reinstall action is reported twice to the clients (one install and one uninstall).
Does this mean that the package is mentioned twice in the transaction table?
It looks like this:
Downloading metadata... Downloading metadata... Downloading metadata... Package Repository Size Reinstalling: bash-5.2.26-3.fc40.x86_64 fedora 1.9 MB replacing bash-5.2.26-3.fc40.x86_64 Transaction Summary: Installing: 0 packages Reinstalling: 1 packages Upgrading: 0 packages Obsoleting: 0 packages Removing: 0 packages Downgrading: 0 packages Is this ok [y/N]: y Downloading packages... Running transaction test... Installing: bash;5.2.26-3.fc40;x86_64;fedora Removing: bash;5.2.26-3.fc40;x86_64;fedora Complete.
Before instead of:
Installing: bash;5.2.26-3.fc40;x86_64;fedora Removing: bash;5.2.26-3.fc40;x86_64;fedora
there was just:
Reinstalling: bash;5.2.26-3.fc40;x86_64;fedora
That looks fine, thanks for the example!
It calls callbacks for
RPMCALLBACK_INST_START
andRPMCALLBACK_INST_PROGRESS
just like before when the reinstall was done through regural install (rpmtsAddInstallElement) but in addition it also callsRPMCALLBACK_UNINST_START
andRPMCALLBACK_UNINST_PROGRESS
. To ensure they find theDnfPackage
add it toremove_helper
array.Unfortunaly this means that the reinstall action is reported twice to the clients (one install and one uninstall). We could try to hide one of the them but I think a better solution is to report what is actually happening and report one install and one uninstall.
Fixes: https://github.com/rpm-software-management/libdnf/issues/1653
This is for the context part of libdnf (microdnf, packagekit, ...)