From 5741fc05e8c65537acbd220418574ad041a3f8fe Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Tue, 11 Mar 2014 14:04:13 -0700 Subject: [PATCH 02/20] Override ROOT_PATH with environmental variable Normally ROOT_PATH is "/mnt/sysimage", but with dirinstall it would be nice to be able to install to arbitrary directories. This lets the path be overridden by the ANACONDA_ROOT_PATH environmental variable. Resolves: rhbz#1113535 Port of rpmostreepayload patches from master commit 2e3d576ee643a676d1ca3f4c194c5fbc59b9d295 --- data/anaconda_options.txt | 4 +++- pyanaconda/constants.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/data/anaconda_options.txt b/data/anaconda_options.txt index 6dc90c4..753609a 100644 --- a/data/anaconda_options.txt +++ b/data/anaconda_options.txt @@ -1,7 +1,9 @@ dirinstall Use the device mounted at /mnt/sysimage as the installation destination. The --dirinstall and --image options are mutually -exclusive. +exclusive. The /mnt/sysimage directory can be overridden by +setting the ANACONDA_ROOT_PATH environmental variable before +starting anaconda. image Specification of disk image file to be used as installation diff --git a/pyanaconda/constants.py b/pyanaconda/constants.py index 266eb53..e864630 100644 --- a/pyanaconda/constants.py +++ b/pyanaconda/constants.py @@ -23,6 +23,8 @@ from pyanaconda.i18n import _, N_ import re +import os + SELINUX_DEFAULT = 1 DISPATCH_BACK = -1 @@ -78,7 +80,7 @@ DD_RPMS = "/tmp/DD-*" TRANSLATIONS_UPDATE_DIR="/tmp/updates/po" ANACONDA_CLEANUP = "anaconda-cleanup" -ROOT_PATH = "/mnt/sysimage" +ROOT_PATH = os.environ.get("ANACONDA_ROOT_PATH", "/mnt/sysimage") MOUNT_DIR = "/mnt/install" DRACUT_REPODIR = "/run/install/repo" DRACUT_ISODIR = "/run/install/source" -- 1.9.3