Bug 528755

Summary: cannot add multiple locks (was: Package state "Protected -- Do Not Modify" not saved)
Product: [openSUSE] openSUSE 11.2 Reporter: Forgotten User b49zM5D78q <forgotten_b49zM5D78q>
Component: YaST2Assignee: E-mail List <zypp-maintainers>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Major    
Priority: P2 - High CC: forgotten_7645792743, gp, lazy.kent, ma, paka, rainer.klute, tgoettlicher
Version: Factory   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: y2log

Description Forgotten User b49zM5D78q 2009-08-06 10:04:45 UTC
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.2) Gecko/20090730 SUSE/3.5.2-1.1 Firefox/3.5.2

I got to report some annoyance in YaST Software installation, not absolutely sure, whether it is a misunderstanding or a bug:

On marking several packages as Protected, this state has been saved only in one case, but normally isn't saved. I guess it's intended to save the Protected state for further calls of the Software Installation tool, isn't it?

Reproducible: Always

Steps to Reproduce:
1. Launch YaST Software installation.
2. Show packages of a repository of your choice
3. Mark several packages as "Protected -- Do Not Modify"
4. (you can do other things there, as mark different packages to be updated)
5. Press Accept button
6. Wait until installation is finished
7. Launch YaST Software installation a second time
8. Go to the same repository as before showing the packages you marked as Protected before


Actual Results:  
The packages marked Protected before are no longer marked Protected.

Expected Results:  
The Protected state should be saved on disk and renewed in subsequent installation sessions.
Comment 1 Kyrill Detinov 2009-08-08 19:05:43 UTC
I confirm.
openSUSE Factory, latest updates installed.
Comment 2 Ladislav Slezák 2009-08-12 11:25:17 UTC
I guess it happens in the Qt frontend. Can you confirm that?
Comment 3 Forgotten User b49zM5D78q 2009-08-12 12:30:21 UTC
Not really. Launching
  yast2 --ncurses sw_single
and marking several pre-installed packages as "Lock" (shotcut ALT+'*'), which can be seen as state "-i-" this locked state isn't remembered even for a second call of the ncurses interface.
BTW: The packages I tried to lock were installed manually and do not come from an active repository in the repository manager, if this plays a role.
Comment 4 Katarina Machalkova 2009-08-13 09:07:05 UTC
Wow, I can reproduce it, but only with some packages :( I've been able to lock the others successfully ...
Comment 5 Forgotten User b49zM5D78q 2009-08-13 12:21:24 UTC
Yes, I got the same effect on one of the tested systems - the Protected state for one package was saved, but for others not. At the moment, I have no idea in which case it is saved and when not.
Comment 6 Katarina Machalkova 2009-08-13 12:49:42 UTC
Created attachment 312644 [details]
y2log
Comment 7 Katarina Machalkova 2009-08-13 12:57:45 UTC
Erm, the bug is not ncurses-specific, locking in qt-pkg fails just as well - seems that we have to ask zypp-maintainers for help. 

From what I've seen in several tests (y2log in comment #6 shows those), no matter how many packages the user tries to lock, only *one* of them ends up in /etc/zypp/locks. E.g the last run of sw_single in the log above tries to lock vim and vim-base, while only vim-base ends up being locked at the end. 

(needinfo-ing for the time being, can be reassigned later)
Comment 8 Jan Kupec 2009-08-13 13:21:34 UTC
Hmm, sounds like this is in libzypp, after all, zypper is affected, too (bug 520015). I did not investigate yet, but this might be related to changes in the PoolQuery.
Comment 9 Forgotten User b49zM5D78q 2009-08-13 13:55:37 UTC
Even more, subsequent locks doesn't lock more than the previous package that was left. At the moment, I can lock maximally one package, independently of how often I restart YaST or zypper and retrying locking more packages.

(In reply to comment #7)
> ...
> From what I've seen in several tests (y2log in comment #6 shows those), no
> matter how many packages the user tries to lock, only *one* of them ends up in
> /etc/zypp/locks. E.g the last run of sw_single in the log above tries to lock
> vim and vim-base, while only vim-base ends up being locked at the end. 
> ...
Comment 10 Katarina Machalkova 2009-08-18 10:26:40 UTC
*** Bug 520195 has been marked as a duplicate of this bug. ***
Comment 11 Michael Andres 2009-09-01 16:43:50 UTC
(In reply to comment #8)
> Hmm, sounds like this is in libzypp, after all, zypper is affected, too (bug
> 520015). I did not investigate yet, but this might be related to changes in the
> PoolQuery.

Yes. Looks like PoolQuery::opertor== broke. I'll fix it.

*** This bug has been marked as a duplicate of bug 501850 ***
Comment 12 Michael Andres 2009-09-01 16:46:05 UTC
Sorry, this is of not a duplicate of #501850. Reopened.
Comment 13 Michael Andres 2009-09-02 09:14:12 UTC
*** Bug 520015 has been marked as a duplicate of this bug. ***
Comment 14 patrick shanahan 2009-09-03 02:45:16 UTC
zypper-1.2.3-1.1.x86_64 
still has the same problem adding more than one lock

11.2/m6
Comment 15 Michael Andres 2009-09-03 08:39:53 UTC
yes, will be fixed in git today
Comment 16 Michael Andres 2009-09-03 12:37:18 UTC
fixed in libzypp-6.14.0
Comment 17 Michael Andres 2009-09-03 13:55:44 UTC
*** Bug 535664 has been marked as a duplicate of this bug. ***