[opensuse-kernel] Running mkinitrd in %posttrans?
Hi, I stumbled on bnc#858840, and wondering whether we can use %posttrans for triggering mkinitrd (or whatever) instead of %post. This will reduce the time when many relevant packages are updated at once. Or am I missing anything obvious...? thanks, Takashi -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
В Mon, 17 Mar 2014 17:17:12 +0100 Takashi Iwai <tiwai@suse.de> пишет:
Hi,
I stumbled on bnc#858840, and wondering whether we can use %posttrans for triggering mkinitrd (or whatever) instead of %post. This will reduce the time when many relevant packages are updated at once. Or am I missing anything obvious...?
+1 :) -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
On 17 March 2014 16:17, Takashi Iwai <tiwai@suse.de> wrote:
I stumbled on bnc#858840, and wondering whether we can use %posttrans for triggering mkinitrd (or whatever) instead of %post. This will reduce the time when many relevant packages are updated at once. Or am I missing anything obvious...?
Ask the zypp devs. But IIRC each package is (was?) installed in its own transaction, so it would make no difference. -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
At Mon, 17 Mar 2014 16:28:40 +0000, Cristian Morales Vega wrote:
On 17 March 2014 16:17, Takashi Iwai <tiwai@suse.de> wrote:
I stumbled on bnc#858840, and wondering whether we can use %posttrans for triggering mkinitrd (or whatever) instead of %post. This will reduce the time when many relevant packages are updated at once. Or am I missing anything obvious...?
Ask the zypp devs. But IIRC each package is (was?) installed in its own transaction, so it would make no difference.
It depends on the implementation. A typical trick is to make the hook calling a script, and the script deletes itself so that it won't be called twice. Takashi -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
El 17/03/14 13:17, Takashi Iwai escribió:
Hi,
I stumbled on bnc#858840, and wondering whether we can use %posttrans for triggering mkinitrd (or whatever) instead of %post. This will reduce the time when many relevant packages are updated at once. Or am I missing anything obvious...?
Yes, you can do that.. however...AFAIK it will require a change in zypp to be effective, since last time I checked, packages were installed one by one and not in a one-shot RPM transaction. -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
At Mon, 17 Mar 2014 23:58:02 -0300, Cristian Rodríguez wrote:
El 17/03/14 13:17, Takashi Iwai escribió:
Hi,
I stumbled on bnc#858840, and wondering whether we can use %posttrans for triggering mkinitrd (or whatever) instead of %post. This will reduce the time when many relevant packages are updated at once. Or am I missing anything obvious...?
Yes, you can do that.. however...AFAIK it will require a change in zypp to be effective, since last time I checked, packages were installed one by one and not in a one-shot RPM transaction.
Hm, we need to double-check, but I thought this has been already fixed; at least, the font configuration is triggered at the end of transaction with the recent packages. Takashi -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
On Tuesday 18 of March 2014 08:57:08 Takashi Iwai wrote:
Hm, we need to double-check, but I thought this has been already fixed; at least, the font configuration is triggered at the end of transaction with the recent packages.
IIRC the texlive kpathsea cache update is also done only once after all packages are installed/updated. Michal Kubeček -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
Cristian Rodríguez <crrodriguez@opensuse.org> writes:
Yes, you can do that.. however...AFAIK it will require a change in zypp to be effective, since last time I checked, packages were installed one by one and not in a one-shot RPM transaction.
libzypp in Factory now collects all %posttrans scriptlets into /var/adm/update-scripts and executes them at the end. Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different." -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
On 3/18/14, 5:49 AM, Andreas Schwab wrote:
Cristian Rodríguez <crrodriguez@opensuse.org> writes:
Yes, you can do that.. however...AFAIK it will require a change in zypp to be effective, since last time I checked, packages were installed one by one and not in a one-shot RPM transaction.
libzypp in Factory now collects all %posttrans scriptlets into /var/adm/update-scripts and executes them at the end.
\o/ Yes, please. There are so many packages other than just the kernel that cause a mkinitrd to be invoked. I would be very happy for that to happen just once. Question, though: What happens if the kernel package is updated and the transaction is interrupted? Is the old kernel package still around? Would we end up with an unbootable system? -Jeff -- Jeff Mahoney SUSE Labs
On Tuesday 18 March 2014 11.46:00 Jeff Mahoney wrote:
On 3/18/14, 5:49 AM, Andreas Schwab wrote:
Cristian Rodríguez <crrodriguez@opensuse.org> writes:
Yes, you can do that.. however...AFAIK it will require a change in zypp to be effective, since last time I checked, packages were installed one by one and not in a one-shot RPM transaction.
libzypp in Factory now collects all %posttrans scriptlets into /var/adm/update-scripts and executes them at the end.
\o/
Yes, please. There are so many packages other than just the kernel that cause a mkinitrd to be invoked. I would be very happy for that to happen just once.
and having a flag in mkinitrd to use pigz if installed would also be a big win. gzip -d initrd-3.13.6-1.g4727218-desktop -c > /tmp/initrd-test time pigz -9 -k initrd-test real 0m10.356s user 1m17.555s sys 0m0.183s time gzip -9 -k initrd-test real 1m15.489s user 1m15.370s sys 0m0.077s ll initrd* -rw-r--r-- 1 root root 101707264 Mar 19 17:50 initrd-test -rw-r--r-- 1 root root 35365962 Mar 19 17:50 initrd-test.gz -rw-r--r-- 1 root root 35351822 Mar 19 17:50 initrd-test.pigz 1 minutes 05 * by the number of kernel/initrd present on the computer.
Question, though: What happens if the kernel package is updated and the transaction is interrupted? Is the old kernel package still around? Would we end up with an unbootable system?
We have multi-kernel yes by default, the worst case being still an interrupt during the mkinitrd touching the previously installed and working initrd ... But this is not new as single point of failure. -- Bruno Friedmann Ioda-Net Sàrl www.ioda-net.ch openSUSE Member GPG KEY : D5C9B751C4653227 irc: tigerfoot
participants (8)
-
Andreas Schwab
-
Andrey Borzenkov
-
Bruno Friedmann
-
Cristian Morales Vega
-
Cristian Rodríguez
-
Jeff Mahoney
-
Michal Kubecek
-
Takashi Iwai