[Bug 1180058] New: Please don't create /boot/do_purge_kernels on initial install
https://bugzilla.suse.com/show_bug.cgi?id=1180058 Bug ID: 1180058 Summary: Please don't create /boot/do_purge_kernels on initial install Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Kernel Assignee: kernel-bugs@opensuse.org Reporter: dcermak@suse.com QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- Currently the %post scriptlet of the kernel creates /boot/do_purge_kernels to trigger zypper's kernel purging. Could this be modified so that it only creates this file on upgrades and *not* on fresh installations? Currently this will cause zypper to try to purge old kernels on fresh installations. While that is short, it can cause noticeable delays until zypper can be used again, especially in resource constrained systems. Could the creation of this file be adjusted so that it is only created on upgrades and not on new installations? -- You are receiving this mail because: You are the assignee for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1180058
https://bugzilla.suse.com/show_bug.cgi?id=1180058#c1
Jiri Slaby
Could the creation of this file be adjusted so that it is only created on upgrades and not on new installations?
Not on the kernel (spec) level, I am afraid. The kernel's %post script has no idea whether it is a first install or update. This is due to allowance of multiple kernels installed in parallel -- kernel is not updated (rpm -U), it is installed (rpm -i). So if anything, zypper could do this by deleting /boot/do_purge_kernels during the very first purge-kernels, instead of doing the real purge. -- You are receiving this mail because: You are the assignee for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1180058
https://bugzilla.suse.com/show_bug.cgi?id=1180058#c2
Michael Andres
(In reply to Dan ��erm��k from comment #0) Not on the kernel (spec) level, I am afraid. The kernel's %post script has no idea whether it is a first install or update. This is due to allowance of multiple kernels installed in parallel -- kernel is not updated (rpm -U), it is installed (rpm -i).
@Jiri, -i/-U does not matter. Rpm always passes as $1 the number of package instances installed. So you can see if you're the first, or the last,...:
$ rpm -iv allscript-test42-1-0.intern.noarch.rpm Preparing packages... %pre $1: 1 allscript-test42-1-0.noarch %post $1: 1 %posttrans $1: 1
$ rpm -iv allscript-test42-2-0.intern.noarch.rpm Preparing packages... %pre $1: 2 allscript-test42-2-0.noarch %post $1: 2 %posttrans $1: 2
$ rpm -iv allscript-test42-2-1.intern.noarch.rpm Preparing packages... %pre $1: 3 allscript-test42-2-1.noarch %post $1: 3 %posttrans $1: 3
$ rpm -e --allmatches allscript-test42 %preun $1: 2 %postun $1: 2 %preun $1: 1 %postun $1: 1 %preun $1: 0 %postun $1: 0
AFAIK it's dracut who evaluates /boot/do_purge_kernels. So if it is not appropriate to call zypper, the scripts there should not do it. -- You are receiving this mail because: You are the assignee for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1180058
https://bugzilla.suse.com/show_bug.cgi?id=1180058#c3
--- Comment #3 from Takashi Iwai
https://bugzilla.suse.com/show_bug.cgi?id=1180058
https://bugzilla.suse.com/show_bug.cgi?id=1180058#c9
--- Comment #9 from OBSbugzilla Bot
https://bugzilla.suse.com/show_bug.cgi?id=1180058
https://bugzilla.suse.com/show_bug.cgi?id=1180058#c18
--- Comment #18 from Swamp Workflow Management
https://bugzilla.suse.com/show_bug.cgi?id=1180058
https://bugzilla.suse.com/show_bug.cgi?id=1180058#c19
--- Comment #19 from Swamp Workflow Management
https://bugzilla.suse.com/show_bug.cgi?id=1180058
https://bugzilla.suse.com/show_bug.cgi?id=1180058#c20
--- Comment #20 from Swamp Workflow Management
https://bugzilla.suse.com/show_bug.cgi?id=1180058
https://bugzilla.suse.com/show_bug.cgi?id=1180058#c21
--- Comment #21 from Swamp Workflow Management
https://bugzilla.suse.com/show_bug.cgi?id=1180058
https://bugzilla.suse.com/show_bug.cgi?id=1180058#c22
--- Comment #22 from Swamp Workflow Management
https://bugzilla.suse.com/show_bug.cgi?id=1180058
https://bugzilla.suse.com/show_bug.cgi?id=1180058#c23
--- Comment #23 from Swamp Workflow Management
https://bugzilla.suse.com/show_bug.cgi?id=1180058
https://bugzilla.suse.com/show_bug.cgi?id=1180058#c24
--- Comment #24 from Swamp Workflow Management
https://bugzilla.suse.com/show_bug.cgi?id=1180058
https://bugzilla.suse.com/show_bug.cgi?id=1180058#c25
--- Comment #25 from Swamp Workflow Management
https://bugzilla.suse.com/show_bug.cgi?id=1180058
https://bugzilla.suse.com/show_bug.cgi?id=1180058#c26
--- Comment #26 from Swamp Workflow Management
https://bugzilla.suse.com/show_bug.cgi?id=1180058
https://bugzilla.suse.com/show_bug.cgi?id=1180058#c27
--- Comment #27 from Swamp Workflow Management
https://bugzilla.suse.com/show_bug.cgi?id=1180058
https://bugzilla.suse.com/show_bug.cgi?id=1180058#c30
Takashi Iwai
participants (1)
-
bugzilla_noreply@suse.com