Bug 1225267

Summary: openSUSE-release and sles-release can be removed and updated even with zypper lock applied
Product: [openSUSE] openSUSE Tumbleweed Reporter: Vanda Barata <vanda.barata>
Component: libzyppAssignee: E-mail List <zypp-maintainers>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None    
Version: Current   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Vanda Barata 2024-05-24 15:37:13 UTC
This issue is happening on both SLES 15 SP4 and openSUSE Leap 15.4, as well as Tumbleweed.

Zypper is able to lock, and resolve the locks, for the `sles-release` package and the `openSUSE-release` package (on their OS respectively), but the packages can still be upgraded and removed.

`zypper ll --solvables` shows the lock
-------------------------------------------------------------------------
7  | openSUSE-release    | 3       | package | (any)      | 
    Keep installed : openSUSE-release-15.4-lp154.166.1.x86_64 (@System)
    Do not install : [2]
        openSUSE-release-15.4-lp154.166.1.x86_64 (repo-update)
        openSUSE-release-15.4-lp154.153.1.x86_64 (repo-oss)
-------------------------------------------------------------------------
but when saving the testcase, it doesn't containt said lock, and it's possible to remove the package.

If the product itself is locked (shipped by the release package), it can't be removed, as expected:
-------------------------------------------------------------------------
hobbes:~ (0)# zypper al product:Leap
Specified lock has been successfully added.
hobbes:~ (0)# zypper in -- -openSUSE-release
Problem: 1: conflicting requests
 Solution 1: Following actions will be done:
  remove lock to allow removal of product:Leap-15.4-1.x86_64
  remove lock to allow removal of product:Leap-15.4-1.x86_64
 Solution 2: do not ask to delete all solvables providing openSUSE-release.x86_64 = 15.4-lp154.166.1
-------------------------------------------------------------------------

It seems the product lock is applied to the -release package but not the other way around.
Comment 1 Michael Andres 2024-07-03 13:06:28 UTC
https://github.com/openSUSE/libzypp/pull/558
Comment 2 Michael Andres 2024-07-04 08:03:44 UTC
fixed in zypper-1.14.77