[Bug 366467] New: Zypper should Import+Trust the key in one step, like YaST
https://bugzilla.novell.com/show_bug.cgi?id=366467
Summary: Zypper should Import+Trust the key in one step, like
YaST
Product: openSUSE 11.0
Version: Alpha 2
Platform: Other
OS/Version: Other
Status: NEW
Severity: Enhancement
Priority: P5 - None
Component: libzypp
AssignedTo: jkupec@novell.com
ReportedBy: francis@opensuse.org
QAContact: dmacvicar@novell.com
Found By: ---
Currently when Zypper wants to import and trust the key it requires two
confirmations:
i.e.
Do you want to trust key id 33DE8FB7C8DA93D2, Dominique Leuenberger (VLC
openSUSE Repository)
https://bugzilla.novell.com/show_bug.cgi?id=366467
User jkupec@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=366467#c1
Ján Kupec
https://bugzilla.novell.com/show_bug.cgi?id=366467
User jkupec@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=366467#c2
Ján Kupec
https://bugzilla.novell.com/show_bug.cgi?id=366467
User jkupec@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=366467#c3
Ján Kupec
https://bugzilla.novell.com/show_bug.cgi?id=366467
User dmacvicar@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=366467#c4
Duncan Mac-Vicar
https://bugzilla.novell.com/show_bug.cgi?id=366467
User jkupec@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=366467#c5
Ján Kupec
The zypper callback can be enhanced so it can receive no/this time/always, where first is no, second is trust, not import and the third trust & import.
That is exactly how i meant it, i just wonder why not do it directly in libzypp, so that other apps don't have to do just that (handle two different callbacks with bool answers, instead of just one with multiple answers). -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=366467
User dmacvicar@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=366467#c6
Duncan Mac-Vicar
https://bugzilla.novell.com/show_bug.cgi?id=366467
User jkupec@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=366467#c7
Ján Kupec
https://bugzilla.novell.com/show_bug.cgi?id=366467
Ján Kupec
https://bugzilla.novell.com/show_bug.cgi?id=366467
User cthiel@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=366467#c8
--- Comment #8 from Christoph Thiel
https://bugzilla.novell.com/show_bug.cgi?id=366467
User dmacvicar@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=366467#c9
Duncan Mac-Vicar
https://bugzilla.novell.com/show_bug.cgi?id=366467
User jkupec@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=366467#c10
--- Comment #10 from Ján Kupec
Patch looks fine. Talked with Jano, only suggestion to change the name of the callback to "accept" instead of "trust" to avoid confusion.
OK, this was easy. The callback is called askUserToAcceptKey now. But the return value enum is typdef enum {KEY_DONT_TRUST=0, KEY_TRUST_TEMPORARILY, KEY_TRUST_AND_IMPORT} KeyTrust; Maybe i should rename those too to: typdef enum {KEY_DONT_ACCEPT=0, KEY_ACCEPT_TEMPORARILY, KEY_ACCEPT_PERMANENTLY} KeyAcceptLevel; ??
Also, if we are breaking the API and changing it, we could use the chance to fix bug 370223 and add a context structure to the callback where libzypp could pass some translated text that the user interface could show, like "the key of repo foo".
Now this is tough. I found it hard to come up with a string that could suite any application. Instead of passing string i decided to pass RepoInfo (wrapped in a struct called KeyContext). But the main problem is that now that we have all the components so beautifully independent, we completely lost the context. In orded to pass _something_ to a KeyRing callback you need to pass it all the way down from RepoManager -> {yum,susetags}::Downloader -> SignatureFileChecker -> KeyRing::verifyFileSignatureWorkflow() -> the callbacks. 4 components in the way now infected with the KeyContext... I'm not committing it yet as i'd like some comments before i do so. See the following attachment. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=366467
User jkupec@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=366467#c11
Ján Kupec
https://bugzilla.novell.com/show_bug.cgi?id=366467
Ján Kupec
https://bugzilla.novell.com/show_bug.cgi?id=366467
User jkupec@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=366467#c12
--- Comment #12 from Ján Kupec
https://bugzilla.novell.com/show_bug.cgi?id=366467
User jkupec@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=366467#c13
Ján Kupec
https://bugzilla.novell.com/show_bug.cgi?id=366467
User coolo@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=366467#c14
Stephan Kulow
https://bugzilla.novell.com/show_bug.cgi?id=366467
User jkupec@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=366467#c15
Ján Kupec
https://bugzilla.novell.com/show_bug.cgi?id=366467
User jkupec@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=366467#c16
--- Comment #16 from Ján Kupec
https://bugzilla.novell.com/show_bug.cgi?id=366467
User jkupec@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=366467#c17
Ján Kupec
participants (1)
-
bugzilla_noreply@novell.com