[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#862139: [flash-kernel] Please, stop flashing multiple times



Le dimanche 7 février 2021, 05:03:56 CET Vagrant Cascadian a écrit :
>[…]
> > update-initramfs: Generating /boot/initrd.img-3.16.0-4-kirkwood
> > flash-kernel: installing version 3.16.0-4-kirkwood
> > Generating kernel u-boot image... done.
> > Flashing kernel (2074936/2097152 bytes)... done.
> > Flashing initramfs (5140458/9437184 bytes)... done.
> 
> ...
> 
> > Traitement des actions différées (« triggers ») pour flash-kernel
> > (3.35+deb8u3) ... flash-kernel: installing version
> > 3.16.0-4-kirkwood
> > Generating kernel u-boot image... done.
> > Flashing kernel (2074936/2097152 bytes)... done.
> > Flashing initramfs (5140458/9437184 bytes)... done.
> 
> This is almost certainly because flash-kernel has hooks in both the
> kernel and initramfs:
> 
>   /etc/kernel/postinst.d/zz-flash-kernel
>   /etc/kernel/postrm.d/zz-flash-kernel
>   /etc/initramfs/post-update.d/flash-kernel
> 
> I don't see a great way around this, as flash-kernel needs to be
> updated when either gets updated, and they may often happen at the
> same time. The triggers do at least prevent it from getting updated
> every time a relevent package gets updated, even it if still happens
> multiple times in any given run...
> 
> 
> That said, someone with a better understanding of dpkg triggers might
> be able to come up with something better...

The problem is twofold:
1. Both changing the kernel and changing the initramfs trigger the 
  flashing (which is okay) but the deferred trigger should be executed
  only once, which it’s not.
  (I’m not sure anymore that was the case, that was 4 years ago.  I 
   guess not as I’m talking about “flashing three times.”)

2. As (badly) shown on the excerpt the files are flashed both just when
  the package is installed (immediate) and when the whole update is
  finished (deferred).

-- 
  Sylvain L. Sauvage


Reply to: