Gentoo Archives: gentoo-commits

From: Brian Dolbec <brian.dolbec@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/layman:master commit in: layman/
Date: Thu, 01 Nov 2012 04:00:49
Message-Id: 1351742379.51ac7357314ff1a3648420e92f26f2d393be0277.dol-sen@gentoo
1 commit: 51ac7357314ff1a3648420e92f26f2d393be0277
2 Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
3 AuthorDate: Thu Nov 1 03:59:39 2012 +0000
4 Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
5 CommitDate: Thu Nov 1 03:59:39 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=51ac7357
7
8 fix a bug in layman-updater to use MakeConf class to create a proper make.conf file.
9 Fix a comment path in MakeConf.
10
11 ---
12 layman/makeconf.py | 2 +-
13 layman/updater.py | 11 ++++-------
14 2 files changed, 5 insertions(+), 8 deletions(-)
15
16 diff --git a/layman/makeconf.py b/layman/makeconf.py
17 index 5f18b63..9740072 100644
18 --- a/layman/makeconf.py
19 +++ b/layman/makeconf.py
20 @@ -281,7 +281,7 @@ class MakeConf:
21
22 def content(self):
23 '''
24 - Returns the content of the /var/layman/make.conf file.
25 + Returns the content of the /var/lib/layman/make.conf file.
26 '''
27 try:
28 make_conf = codecs.open(self.path, 'r', 'utf-8')
29
30 diff --git a/layman/updater.py b/layman/updater.py
31 index 1108ea3..ba9a1b8 100644
32 --- a/layman/updater.py
33 +++ b/layman/updater.py
34 @@ -145,12 +145,9 @@ class Main(object):
35 self.output.info(" Creating layman's make.conf file")
36 # create layman's %(storage)s/make.conf
37 # so portage won't error
38 - try:
39 - make_conf = fileopen(self.config['make_conf'], mode="w")
40 - make_conf.write("# Layman's make.conf\n\n")
41 - make_conf.close()
42 - except Exception, error:
43 - self.output.error(" layman-updater: Error creating make.conf:")
44 - self.output.error(" %s" % error)
45 + from layman.makeconf import MakeConf
46 + maker = MakeConf(self.config, None)
47 + maker.write()
48 +