#
# Directory to archive replaced configs
-archive-dir=/etc/config-archive
+archive-dir=${EPREFIX}/etc/config-archive
# Use rcs for storing files in the archive directory?
# WARNING: When configured to use rcs, read and execute permissions of
import portage
from portage.env.loaders import KeyValuePairFileLoader
from portage.localization import _
+from portage.util import varexpand
RCS_BRANCH = '1.1.1'
RCS_LOCK = 'rcs -ko -M -l'
else:
print(_('dispatch-conf: Missing option "%s" in /etc/dispatch-conf.conf; fatal') % (key,), file=sys.stderr)
+ # archive-dir supports ${EPREFIX} expansion, in order to avoid hardcoding
+ variables = {"EPREFIX": eprefix}
+ opts['archive-dir'] = varexpand(opts['archive-dir'], mydict=variables)
+
if not os.path.exists(opts['archive-dir']):
os.mkdir(opts['archive-dir'])
# Use restrictive permissions by default, in order to protect