commit: 854b4944acf466573f4fde14c6bd36807be0b220
Author: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 3 02:43:41 2015 +0000
Commit: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
CommitDate: Tue Feb 3 02:43:41 2015 +0000
URL:
http://sources.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=854b4944
updater.py: Modifies print_instructions function to optionally output make.conf
information
---
layman/updater.py | 33 +++++++++++++++++----------------
1 file changed, 17 insertions(+), 16 deletions(-)
diff --git a/layman/updater.py b/layman/updater.py
index 874e3c3..7ccc9bd 100644
--- a/layman/updater.py
+++ b/layman/updater.py
@@ -133,9 +133,6 @@ class Main(object):
def print_instructions(self):
- make_conf = '/etc/portage/make.conf'
- if not os.access(make_conf, os.F_OK):
- make_conf = '/etc/make.conf'
messages = [
"You are now ready to add overlays into your system.",
"",
@@ -146,19 +143,23 @@ class Main(object):
"Select an overlay and add it using",
"",
" layman -a overlay-name",
- "",
- "If this is the very first overlay you add with layman,",
- "you need to append the following statement to your",
- "%s file:" %make_conf,
- "",
- " source /var/lib/layman/make.conf",
- "",
- "If you modify the 'storage' parameter in the layman",
- "configuration file (/etc/layman/layman.cfg) you will",
- "need to adapt the path given above to the new storage",
- "directory.",
- "",
- ]
+ "",]
+ if 'make.conf' in self.config['conf_type']:
+ make_conf = '/etc/portage/make.conf'
+ if not os.access(make_conf, os.F_OK):
+ make_conf = '/etc/make.conf'
+ message += [
+ "If this is the very first overlay you add with layman,",
+ "you need to append the following statement to your",
+ "%s file:" % make_conf,
+ "",
+ " source /var/lib/layman/make.conf",
+ "",
+ "If you modify the 'storage' parameter in the layman",
+ "configuration file (/etc/layman/layman.cfg) you will",
+ "need to adapt the path given above to the new storage",
+ "directory.",
+ "",]
for message in messages:
self.output.info(" " + message)