[zypp-devel] RFC - Bug 737843 - zypper patch installs optional patches
Hi. bnc#737843 requires zypper not to install optional patches per default in 'zypper patch'. Issues I see when fixing this: 1) 'zypper lp' should IMO remain unchanged and continue to display all, including optional, patches. 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 3) To install all optional patches you can use 'zypper patch -g optional'. But there seems to be no way to install 'all', including optional, patches in one go. You can not pass multiple '-g <category>' options (1st wins), nor some <categorylist> like '-g optional,recommended', nor '-g all'. I think at least '-g all' should be implemented. Does anybody see more trouble ahead? -- cu, Michael Andres +------------------------------------------------------------------+ Key fingerprint = 2DFA 5D73 18B1 E7EF A862 27AC 3FB8 9E3A 27C6 B0E4 +------------------------------------------------------------------+ Michael Andres SUSE LINUX Products GmbH, Development, ma@suse.de GF:Jeff Hawn,Jennifer Guild,Felix Imendörffer, HRB16746(AG Nürnberg) Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 740 53-0 +------------------------------------------------------------------+ -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org To contact the owner, e-mail: zypp-devel+owner@opensuse.org
* Michael Andres <ma@suse.de> [Feb 09. 2012 17:18]:
Hi.
bnc#737843 requires zypper not to install optional patches per default in 'zypper patch'.
I just commented on this bug. Its clearly a feature, not a bug to me. Changing the default behaviour of zypper would violate the principle of least surprise.
Issues I see when fixing this:
1) 'zypper lp' should IMO remain unchanged and continue to display all, including optional, patches.
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.
Absolutely !
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
How about ZYPPER_EXIT_INF_UPDATE_OPTIONAL ? This matches better to ZYPPER_EXIT_INF_UPDATE_NEEDED
3) To install all optional patches you can use 'zypper patch -g optional'. But there seems to be no way to install 'all', including optional, patches in one go.
You can not pass multiple '-g <category>' options (1st wins), nor some <categorylist> like '-g optional,recommended', nor '-g all'.
Thats bad and needs fixing.
I think at least '-g all' should be implemented.
Yes. And implementing "-g optional,recommended" vs "-g optional -g recommended" is debatable.
Does anybody see more trouble ahead?
The trouble is choosing the right default, which should be reflected in zypper.conf. IMHO, "all" should be the default, since selective patch installation is something for the more experienced (who should be able to adapt zypper.conf ;-)) Regards, Klaus --- SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5, 90409 Nürnberg, Germany -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org To contact the owner, e-mail: zypp-devel+owner@opensuse.org
On Thu, Feb 09, 2012 at 05:39:59PM +0100, Klaus Kaempf wrote:
IMHO, "all" should be the default, since selective patch installation is something for the more experienced (who should be able to adapt zypper.conf ;-))
You're joking, right? Why do we release optional updates at all if they are installed anyway? (And it's just zypper, YaST/packagekit honors the optional flag, right?) M. -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org To contact the owner, e-mail: zypp-devel+owner@opensuse.org
On Thu, Feb 09, 2012 at 06:02:34PM +0100, Michael Schroeder wrote:
On Thu, Feb 09, 2012 at 05:39:59PM +0100, Klaus Kaempf wrote:
IMHO, "all" should be the default, since selective patch installation is something for the more experienced (who should be able to adapt zypper.conf ;-))
You're joking, right? Why do we release optional updates at all if they are installed anyway? (And it's just zypper, YaST/packagekit honors the optional flag, right?)
Let me rephrase this: The defaults of 'zypper patch' and 'zypper pchk' should be so that people can put them into a cron job to keep their system in an supported state. The maintenance team uses optional patches when they think the update is not useful for most users. The idea of optional patches is exactly that they are not installed by default (i.e. in a cron job), but with a deliberate decision from the sysadmin. Cheers, Michael. -- Michael Schroeder mls@suse.de 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@opensuse.org To contact the owner, e-mail: zypp-devel+owner@opensuse.org
* Michael Schroeder <mls@suse.de> [Feb 09. 2012 18:29]:
On Thu, Feb 09, 2012 at 06:02:34PM +0100, Michael Schroeder wrote:
On Thu, Feb 09, 2012 at 05:39:59PM +0100, Klaus Kaempf wrote:
IMHO, "all" should be the default, since selective patch installation is something for the more experienced (who should be able to adapt zypper.conf ;-))
You're joking, right? Why do we release optional updates at all if they are installed anyway? (And it's just zypper, YaST/packagekit honors the optional flag, right?)
Let me rephrase this:
The defaults of 'zypper patch' and 'zypper pchk' should be so that people can put them into a cron job to keep their system in an supported state.
Thats exactly the scenario _experienced_ admins will deploy.
The maintenance team uses optional patches when they think the update is not useful for most users.
If a patch is not applicable for most users, it shouldn't be released in the first place. And if, then as a PTF (problem temporary fix == customer specific)
The idea of optional patches is exactly that they are not installed by default (i.e. in a cron job), but with a deliberate decision from the sysadmin.
My understanding of 'optional' is different: Not strictly required to be in a 'maintained' state but safe to apply anyways. Regards, Klaus --- SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5, 90409 Nürnberg, Germany -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org To contact the owner, e-mail: zypp-devel+owner@opensuse.org
Dne Čt 9. února 2012 20:05:49, Klaus Kaempf napsal(a):
* Michael Schroeder <mls@suse.de> [Feb 09. 2012 18:29]:
On Thu, Feb 09, 2012 at 06:02:34PM +0100, Michael Schroeder wrote:
On Thu, Feb 09, 2012 at 05:39:59PM +0100, Klaus Kaempf wrote:
IMHO, "all" should be the default, since selective patch installation is something for the more experienced (who should be able to adapt zypper.conf ;-))
You're joking, right? Why do we release optional updates at all if they are installed anyway? (And it's just zypper, YaST/packagekit honors the optional flag, right?)
Let me rephrase this:
The defaults of 'zypper patch' and 'zypper pchk' should be so that people can put them into a cron job to keep their system in an supported state.
Thats exactly the scenario _experienced_ admins will deploy.
The maintenance team uses optional patches when they think the update is not useful for most users.
If a patch is not applicable for most users, it shouldn't be released in the first place. And if, then as a PTF (problem temporary fix == customer specific)
The idea of optional patches is exactly that they are not installed by default (i.e. in a cron job), but with a deliberate decision from the sysadmin.
My understanding of 'optional' is different: Not strictly required to be in a 'maintained' state but safe to apply anyways.
Well, we used to use patches to drag in some proprietary stuff (fonts, gfx drivers). I see optional patches more like bringing new features. To have a real-life example for SLES11-SP1: We ship as a patch the DUD which adds support for update via AutoYaST (it effectively brings a new package which contains the DUD). It is completely useless to install this patch on any SLES11-SP1 box; what you need to do is to get the DUD once and use it to update the installation environment. Jiri
Regards,
Klaus --- SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5, 90409 Nürnberg, Germany
-- Regards, Jiri Srain Project Manager --------------------------------------------------------------------- SUSE LINUX, s.r.o. e-mail: jsrain@suse.cz Lihovarska 1060/12 tel: +420 284 084 659 190 00 Praha 9 fax: +420 284 084 001 Czech Republic http://www.suse.cz -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org To contact the owner, e-mail: zypp-devel+owner@opensuse.org
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@suse.de 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@opensuse.org To contact the owner, e-mail: zypp-devel+owner@opensuse.org
On Thursday 09 February 2012 18:22:10 Michael Schroeder wrote:
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.
+1 In this case I'd also exclude optional patches from 'zypper lp' and show them only in 'zypper lp -g all'. So you get what you see. In presence of optional patches 'lp/patch' can drop an info message: N optional patches are also available. Call 'path -g all' them. Zypper does similar in presence of locked patches. This would give us consistenty among lp/pchk/patch. And without a new return value, we can also expect most scripts using 'pchk' to continue working. -- cu, Michael Andres +------------------------------------------------------------------+ Key fingerprint = 2DFA 5D73 18B1 E7EF A862 27AC 3FB8 9E3A 27C6 B0E4 +------------------------------------------------------------------+ Michael Andres SUSE LINUX Products GmbH, Development, ma@suse.de GF:Jeff Hawn,Jennifer Guild,Felix Imendörffer, HRB16746(AG Nürnberg) Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 740 53-0 +------------------------------------------------------------------+ -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org To contact the owner, e-mail: zypp-devel+owner@opensuse.org
participants (4)
-
Jiri Srain
-
Klaus Kaempf
-
Michael Andres
-
Michael Schroeder