[rhel7] Don't install langpacks.conf if nowhere to install to (#1172004)
Samantha N. Bueno
sbueno+anaconda at redhat.com
Tue Dec 16 21:08:21 UTC 2014
On Tue, Dec 16, 2014 at 03:12:02PM -0500, David Shea wrote:
> Some installations don't install yum. Some installations don't really
> care about the langpacks config.
Looks good to me.
>
> Resolves: rhbz#1172004
> ---
> pyanaconda/packaging/yumpayload.py | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py
> index 4b038ec..19eb0fd 100644
> --- a/pyanaconda/packaging/yumpayload.py
> +++ b/pyanaconda/packaging/yumpayload.py
> @@ -255,8 +255,15 @@ class YumPayload(PackagePayload):
> f.write("langpack_locales = %s\n" % ", ".join(langs))
>
> def _copyLangpacksConfigToTarget(self):
> - shutil.copy2(_yum_installer_langpack_conf,
> - iutil.getSysroot()+_yum_target_langpack_conf)
> + target_langpack_conf = iutil.getSysroot() + _yum_target_langpack_conf
> +
> + # The directory for the config may not exist if yum was not installed
> + # to the target. If this is the case, skip installing the config.
> + if not os.path.exists(os.path.dirname(target_langpack_conf)):
> + log.debug("langpack directory not found, not copying langpacks.conf to taget")
> + else:
> + shutil.copy2(_yum_installer_langpack_conf,
> + target_langpack_conf)
>
> def _writeYumConfig(self):
> """ Write out anaconda's main yum configuration file. """
> --
> 2.1.0
>
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
More information about the anaconda-patches
mailing list