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

ConfirmGPGImport seems not to work as expected #13

Closed anaselli closed 4 years ago

anaselli commented 7 years ago

I added google-chrome repository (/etc/yum.repos.d/google-chrome.repo) then i used either dnfdragora or yume-dnf to install google-chrome-stable. They correctly ask to get the gpg key from the configured site and provide the related info, but after the transaction is run again the question to get the gpg key is asked again and again. dnfdragora code is in https://github.com/manatools/dnfdragora/blob/master/dnfdragora/ui.py#L938

anaselli commented 7 years ago

a deeper investigation makes me found the issue at least for chrome repo. The repo is configured as following:

[google-chrome]
name=google-chrome - $basearch
baseurl=http://dl.google.com/linux/chrome/rpm/stable/$basearch
enabled=1
gpgcheck=1
gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub

and if you look at https://dl-ssl.google.com/linux/linux_signing_key.pub it contains two keys. I tried to move the key to a local file containing one key only and worked

anaselli commented 4 years ago

After about two years here i am back on this subject. I reviewed dnfdragora code implementing a client that uses a thread instead GLib.MainLoop, anyway i found that yumex-dnf and dnfdragora implemented this feature bad. The right way to manage keys (two in my example above) should be to ask for import them and confirming using ConfirmGPGImport on GPGImport event (e.g. into its overload method). Run transaction fails after invoking GPGImport at this point transaction can be created and run again with keys confirmed (and added). The problem in yumex-dnf implementation in confirming into run trnsaction failure, was that just the last key was set into an attribute missing the first one to be confirmed.