Michael Andres changed bug 1180058
What Removed Added
Component libzypp Kernel
Assignee zypp-maintainers@suse.de kernel-bugs@opensuse.org

Comment # 2 on bug 1180058 from
(In reply to Jiri Slaby from comment #1)
> (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: