Mailinglist Archive: zypp-devel (16 mails)

< Previous Next >
Re: [zypp-devel] RFC - Bug 737843 - zypper patch installs optional patches
On Thu, Feb 09, 2012 at 05:18:11PM +0100, Michael Andres wrote:
2) It should have some impact on 'zypper pchk', which returns the exit codes
0,
100 (ZYPPER_EXIT_INF_UPDATE_NEEDED) or
101 (ZYPPER_EXIT_INF_SEC_UPDATE_NEEDED),
if no updates, updates or even security updates are pending.

If 'zypper patch' will omit optional patches, 'zypper pchk' should do the
same.

But if optional patches do not count to ZYPPER_EXIT_INF_UPDATE_NEEDED, zypper
would return 0 if only optional patches are pending. But 0 should IMO be 'no
patches at all'. Thus I'd like to introduce a new return value:
ZYPPER_EXIT_INF_OPTIONAL_UPDATES_ONLY

I don't think adding another exit code is necessary. I'd
just return 0 if no patch needs to be installed.
(I.e. zypper patch does nothing -> zypper pchk returns 0)

Maybe we should also add support for -g to pchk, to make things
more consistent. Thus

zypper pchk -g all

would return 101 if there's a needed security update, otherwise
100 if there's a needed recommended or optional update.

Cheers,
Michael.

--
Michael Schroeder mls@xxxxxxx
SUSE LINUX Products GmbH, GF Jeff Hawn, HRB 16746 AG Nuernberg
main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);}
--
To unsubscribe, e-mail: zypp-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: zypp-devel+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups
References