mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-29 10:25:36 -04:00
[localecfg] Fix mismatch between filenames
Testing for existence of a file in the live system, and then copying it in the target system, is not a recipe for success. - Fix the restore-from-backup part. - Document that your live and target system must both have /etc/locale.gen if you want this to work at all.
This commit is contained in:
parent
7498629b5f
commit
efc977f7b4
1 changed files with 5 additions and 4 deletions
|
@ -54,11 +54,12 @@ def run():
|
||||||
target_etc_default_path = "{!s}/etc/default".format(install_path)
|
target_etc_default_path = "{!s}/etc/default".format(install_path)
|
||||||
|
|
||||||
# restore backup if available
|
# restore backup if available
|
||||||
if os.path.exists('/etc/locale.gen.bak'):
|
if os.path.exists(target_locale_gen_bak):
|
||||||
shutil.copy2(target_locale_gen_bak,
|
shutil.copy2(target_locale_gen_bak, target_locale_gen)
|
||||||
target_locale_gen)
|
|
||||||
|
|
||||||
# run locale-gen if detected
|
# run locale-gen if detected; this *will* cause an exception
|
||||||
|
# if the live system has locale.gen, but the target does not:
|
||||||
|
# in that case, fix your installation filesystem.
|
||||||
if os.path.exists('/etc/locale.gen'):
|
if os.path.exists('/etc/locale.gen'):
|
||||||
text = []
|
text = []
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue