Bug 285915

Summary: Searching through packages cannot be canceled
Product: [openSUSE] openSUSE 10.3 Reporter: Ladislav Michnovic <lmichnovic>
Component: YaST2Assignee: Stefan Hundhammer <shundhammer>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None    
Version: Alpha 4plus   
Target Milestone: ---   
Hardware: i586   
OS: openSUSE 10.3   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: yast2 logs

Description Ladislav Michnovic 2007-06-20 14:22:32 UTC
Created attachment 147375 [details]
yast2 logs

I have entered only one letter for searching mask trough RPMs and run the searching by mistake. It opened a progress bar with Cancel button. I have clicked on the cancel button many times but it only dismiss and opened again the progress bar. Attaching y2logs.
Comment 1 Ladislav Slezák 2007-07-19 06:06:15 UTC
The problem is in the packager widget.

(I suppose you used the Qt UI, the ncurses UI might be also affected, adding Katarina to CC...)
Comment 2 Ladislav Michnovic 2007-07-19 08:23:14 UTC
Yes, I used the QT UI.
Comment 3 Katarina Machalkova 2007-07-19 08:40:42 UTC
ncurses UI is for sure affected as well, due to the simple fact that thread support is disabled there. I.e. we have no separate UI thread that would take notice of the event 'user pressed cancel button', while packager is doing the search through rpm packages.
However, Qt UI should have thread support, but HuHa is on vacation right now
Comment 4 Stefan Hundhammer 2007-07-24 08:58:53 UTC
You are right. Looks like that check got lost during the migration to libzypp.

Index: YQPkgSearchFilterView.cc
===================================================================
--- YQPkgSearchFilterView.cc    (Revision 39627)
+++ YQPkgSearchFilterView.cc    (Arbeitskopie)
@@ -222,7 +222,7 @@
        int count = 0;

        for ( ZyppPoolIterator it = zyppPkgBegin();
-             it != zyppPkgEnd();
+             it != zyppPkgEnd() && ! progress.wasCancelled();
              ++it )
        {
            ZyppSel selectable = *it;