[PATCH 4/5] move new-kernel-pkg rpmposttrans to end of install

Vratislav Podzimek vpodzime at redhat.com
Tue May 27 07:39:15 UTC 2014


On Mon, 2014-05-26 at 17:01 -0400, Gene Czarcinski wrote:
> This address BZ 1099627 and BZ 1100504.
> 
> A regular DVD or network install creates the rescue kernel
> and initramfs as part of the install performed by anaconda-yum
> and not postInstall.
> 
> This needs to be done in Live also so that when the bootloader
> configuration file is created, it has the correct files to work with.
> 
> Note the comment in the code that says it must be done before
> bootloader.
> ---
>  pyanaconda/packaging/livepayload.py | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/pyanaconda/packaging/livepayload.py b/pyanaconda/packaging/livepayload.py
> index 42f9793..be0ea91 100644
> --- a/pyanaconda/packaging/livepayload.py
> +++ b/pyanaconda/packaging/livepayload.py
> @@ -144,6 +144,12 @@ class LiveImagePayload(ImagePayload):
>              self.pct = 100
>          threadMgr.wait(THREAD_LIVE_PROGRESS)
>  
> +        # Live needs to create the rescue image before bootloader is written
> +        for kernel in self.kernelVersionList:
> +            log.info("Generating rescue image for %s", kernel)
> +            iutil.execInSysroot("new-kernel-pkg",
> +                                ["--rpmposttrans", kernel])
> +
>      def postInstall(self):
>          """ Perform post-installation tasks. """
>          progressQ.send_message(_("Performing post-installation setup tasks"))
> @@ -151,12 +157,6 @@ class LiveImagePayload(ImagePayload):
>  
>          super(LiveImagePayload, self).postInstall()
>  
> -        # Live needs to create the rescue image before bootloader is written
> -        for kernel in self.kernelVersionList:
> -            log.info("Generating rescue image for %s", kernel)
> -            iutil.execInSysroot("new-kernel-pkg",
> -                                ["--rpmposttrans", kernel])
> -
>          # Make sure the new system has a machine-id, it won't boot without it
>          if not os.path.exists(iutil.getSysroot()+"/etc/machine-id"):
>              iutil.execInSysroot("systemd-machine-id-setup", [])
This looks good to me.

-- 
Vratislav Podzimek

Anaconda Rider | RHCE | Red Hat, Inc. | Brno - Czech Republic




More information about the anaconda-patches mailing list