Gentoo Archives: gentoo-commits

From: Devan Franchini <twitch153@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/layman:master commit in: layman/
Date: Tue, 03 Feb 2015 02:43:41
Message-Id: 1422931421.854b4944acf466573f4fde14c6bd36807be0b220.twitch153@gentoo
1 commit: 854b4944acf466573f4fde14c6bd36807be0b220
2 Author: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
3 AuthorDate: Tue Feb 3 02:43:41 2015 +0000
4 Commit: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
5 CommitDate: Tue Feb 3 02:43:41 2015 +0000
6 URL: http://sources.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=854b4944
7
8 updater.py: Modifies print_instructions function to optionally output make.conf information
9
10 ---
11 layman/updater.py | 33 +++++++++++++++++----------------
12 1 file changed, 17 insertions(+), 16 deletions(-)
13
14 diff --git a/layman/updater.py b/layman/updater.py
15 index 874e3c3..7ccc9bd 100644
16 --- a/layman/updater.py
17 +++ b/layman/updater.py
18 @@ -133,9 +133,6 @@ class Main(object):
19
20
21 def print_instructions(self):
22 - make_conf = '/etc/portage/make.conf'
23 - if not os.access(make_conf, os.F_OK):
24 - make_conf = '/etc/make.conf'
25 messages = [
26 "You are now ready to add overlays into your system.",
27 "",
28 @@ -146,19 +143,23 @@ class Main(object):
29 "Select an overlay and add it using",
30 "",
31 " layman -a overlay-name",
32 - "",
33 - "If this is the very first overlay you add with layman,",
34 - "you need to append the following statement to your",
35 - "%s file:" %make_conf,
36 - "",
37 - " source /var/lib/layman/make.conf",
38 - "",
39 - "If you modify the 'storage' parameter in the layman",
40 - "configuration file (/etc/layman/layman.cfg) you will",
41 - "need to adapt the path given above to the new storage",
42 - "directory.",
43 - "",
44 - ]
45 + "",]
46 + if 'make.conf' in self.config['conf_type']:
47 + make_conf = '/etc/portage/make.conf'
48 + if not os.access(make_conf, os.F_OK):
49 + make_conf = '/etc/make.conf'
50 + message += [
51 + "If this is the very first overlay you add with layman,",
52 + "you need to append the following statement to your",
53 + "%s file:" % make_conf,
54 + "",
55 + " source /var/lib/layman/make.conf",
56 + "",
57 + "If you modify the 'storage' parameter in the layman",
58 + "configuration file (/etc/layman/layman.cfg) you will",
59 + "need to adapt the path given above to the new storage",
60 + "directory.",
61 + "",]
62
63 for message in messages:
64 self.output.info(" " + message)