Bug 801776

Summary: Stacking -t options are no longer possible for zypper list-updates
Product: [openSUSE] openSUSE Tumbleweed Reporter: Lars Vogdt <lars.vogdt>
Component: libzyppAssignee: E-mail List <zypp-maintainers>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Enhancement    
Priority: P3 - Medium CC: ncutler
Version: Current   
Target Milestone: Current   
Hardware: All   
OS: SUSE Other   
Whiteboard:
Found By: Development Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Lars Vogdt 2013-02-01 17:25:07 UTC
In all older distributions, it is possible to stack the update types with the "-t" option. With the current zypper implementation on 12.2 this seems to be lost.

--------------------------------------------------------------------------[snip]
~# /usr/bin/zypper list-updates -t patch -t package
Loading repository data...
Reading installed packages...

Patches
The following software management updates will be installed first:

Repository           | Name             | Version | Category    | Status | Summary             
---------------------+------------------+---------+-------------+--------+---------------------
openSUSE-12.2-Update | openSUSE-2013-70 | 1       | recommended | needed | Softwarestack update

The following updates are also available:

Repository           | Name              | Version | Category    | Status | Summary                                                                          
---------------------+-------------------+---------+-------------+--------+----------------------------------------------------------------------------------
openSUSE-12.2-Update | openSUSE-2012-768 | 1       | recommended | needed | aaa_base: Enforce creation of /etc/adjtime even if no /etc/sysconfig/clock exists
openSUSE-12.2-Update | openSUSE-2013-52  | 1       | security    | needed | update for cronie   

--------------------------------------------------------------------------[snap]

You might notice that the "-t package" options is ignored completely. If you switch the commandline options (/usr/bin/zypper list-updates -t package -t patch) - the output stays the same. 

I'm currently running the following command to get a list of packages and patches at once in the nagios-plugins-zypper package:
/usr/bin/zypper --xmlout --non-interactive list-updates -t package -t patch

Now I just see the patches - but no packages any more. Can you please re-implement the old zypper behavior to stack the -t options ?
Comment 1 Michael Andres 2013-02-15 17:42:49 UTC
The code has not been changed, but intentionally suppresses all other kinds than patches IFF software management updates are available (since Nov. 2008).

I admit the behavior is strange, but I need to check whether this is actually a feature before I can think about changing it.
Comment 2 Michael Andres 2013-02-18 15:15:39 UTC
It's definitely a 'feature'. Software management updates need to be installed prior to any other update _and_ require a restart of zypper/yast.

In the presence of software management updates zypper list patches with xml-output will list _only_ the software management updates. All other patches or package updates are not included in the <update-list>.


On the terminal other patch updates waiting behind the software management updates are shown in a 2nd list, but additional package updates are suppressed. Unfortunately without some explanation.

AFAIK we can not extend the xml <update-list>, all we could do is introducing a 2nd <deferred-update-list> in xml output which would then contain all the remaining items, in case this is actually needed.
Comment 3 Nathan Cutler 2017-08-15 22:15:52 UTC
12.3 is out of maintenance, moving to Tumbleweed.
Comment 4 Michael Andres 2019-02-25 12:46:08 UTC
Seems to be fixed in recent zypper versions.