Bug 804054

Summary: Update with Apper/Packagekit does not respect deselected packages
Product: [openSUSE] openSUSE 12.3 Reporter: Hans Schwimmbeck <hans>
Component: GNOMEAssignee: E-mail List <gnome-bugs>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P5 - None CC: coolo, erwin.vandevelde
Version: RC 1   
Target Milestone: ---   
Hardware: x86-64   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Relevant part of /var/log/pk_backend_zypp(.zip), entire file was huge

Description Hans Schwimmbeck 2013-02-15 17:44:56 UTC
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:18.0) Gecko/20100101 Firefox/18.0

During a net installation of openSUSE 12.3 RC1 I deselected several patterns and packages. The list was written to /var/lib/zypp/SoftLocks.
After being prompted for updates I proceeded and Apper tried to install not only updates of installed packages, but also the deselected packages.
The same update with

"Yast - Install Software - Package - All packages - Update if newer version available"

gave the expected result of installing only updates and no deselected packages.

Reproducible: Didn't try

Steps to Reproduce:
1.
2.
3.
Comment 1 Hans Schwimmbeck 2013-02-27 17:27:27 UTC
Today obviously factory-snapshot was updated to RC2, same result. Apper tried to pull in deselected softdeps.
I have packman factory repo enabled, don't know if it makes a difference.
Comment 2 Hans Schwimmbeck 2013-02-27 17:32:30 UTC
Created attachment 527268 [details]
Relevant part of /var/log/pk_backend_zypp(.zip), entire file was huge
Comment 3 Michael Andres 2013-02-28 13:13:56 UTC
Coolo: It looks like after backend_update_packages_thread all status information related to locks (hard/soft) is gone.

As the PoolStatusSaver class restores the status in it's DTOR it's important that the object is created _after_ the pool is prepared. Otherwise an empty status is saved and restored, losing the locks applied when loading the target.

backend_update_packages_thread is probably not the only location where a PoolStatusSaver is created too early.
Comment 4 Michael Andres 2013-02-28 15:16:00 UTC
Suggested fix via submitt request #156842 -> GNOME:Factory
Comment 5 Stephan Kulow 2013-02-28 15:34:42 UTC
hmm, this has been the same in PK 0.7 too - so it should be the case for all distributions ever having PK.
Comment 6 Stephan Kulow 2013-02-28 15:38:43 UTC
I rebased your patch and pushed it upstream: 
http://gitorious.org/packagekit/packagekit/commit/e81a7af4d48348f00c40532c23a097533795c1b6

will supersede your submission
Comment 7 Michael Andres 2013-02-28 15:58:40 UTC
(In reply to comment #5)
> hmm, this has been the same in PK 0.7 too - so it should be the case for all
> distributions ever having PK.

Could explain bug #766801 then.
Comment 8 Bernhard Wiedemann 2013-02-28 16:00:25 UTC
This is an autogenerated message for OBS integration:
This bug (804054) was mentioned in
https://build.opensuse.org/request/show/156860 Factory / PackageKit
Comment 9 Hans Schwimmbeck 2013-03-01 08:04:48 UTC
As a hopefully temporary workaround I installed good old kupdateapplet with zypp backend from KDE:Distro:Factory.
Requires root password to confirm update process, but works as intended.
Comment 10 Stephan Kulow 2013-03-01 08:05:23 UTC
fixed for GM
Comment 11 Michael Andres 2013-03-04 08:28:43 UTC
*** Bug 766801 has been marked as a duplicate of this bug. ***