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/overlays/modules/bzr/, etc/, layman/overlays/modules/tar/, ...
Date: Sun, 08 Feb 2015 00:33:38
Message-Id: 1423342118.33be1c1e3e55d17e601bbe1f30e08582b9419e5e.twitch153@gentoo
1 commit: 33be1c1e3e55d17e601bbe1f30e08582b9419e5e
2 Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
3 AuthorDate: Thu Feb 5 17:22:23 2015 +0000
4 Commit: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
5 CommitDate: Sat Feb 7 20:48:38 2015 +0000
6 URL: http://sources.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=33be1c1e
7
8 Pyflakes import and whitespace cleanup
9
10 ---
11 etc/layman.cfg | 2 +-
12 layman/overlays/modules/bzr/bzr.py | 4 ++--
13 layman/overlays/modules/cvs/cvs.py | 15 +++++++--------
14 layman/overlays/modules/git/git.py | 4 +---
15 layman/overlays/modules/mercurial/mercurial.py | 3 +--
16 layman/overlays/modules/squashfs/squashfs.py | 2 --
17 layman/overlays/modules/svn/svn.py | 3 +--
18 layman/overlays/modules/tar/tar.py | 1 -
19 8 files changed, 13 insertions(+), 21 deletions(-)
20
21 diff --git a/etc/layman.cfg b/etc/layman.cfg
22 index 2a8eabf..2aa7dd7 100644
23 --- a/etc/layman.cfg
24 +++ b/etc/layman.cfg
25 @@ -58,7 +58,7 @@ repos_conf : /etc/portage/repos.conf/layman.conf
26 auto_sync : Yes
27
28 #-----------------------------------------------------------
29 -# Repository config types used by layman
30 +# Repository config types used by layman
31 # (repos.conf, make.conf)
32
33 conf_type : repos.conf
34
35 diff --git a/layman/overlays/modules/bzr/bzr.py b/layman/overlays/modules/bzr/bzr.py
36 index 03b0730..75163c6 100644
37 --- a/layman/overlays/modules/bzr/bzr.py
38 +++ b/layman/overlays/modules/bzr/bzr.py
39 @@ -58,7 +58,7 @@ class BzrOverlay(OverlaySource):
40 if source.endswith("/"):
41 return source
42 return source + '/'
43 -
44 +
45 def add(self, base):
46 '''Add overlay.'''
47
48 @@ -82,7 +82,7 @@ class BzrOverlay(OverlaySource):
49 def update(self, base, src):
50 '''
51 Updates overlay src-url.
52 -
53 +
54 @params base: base location where all overlays are installed.
55 @params src: source URL.
56 '''
57
58 diff --git a/layman/overlays/modules/cvs/cvs.py b/layman/overlays/modules/cvs/cvs.py
59 index 3dc6469..7c558ae 100644
60 --- a/layman/overlays/modules/cvs/cvs.py
61 +++ b/layman/overlays/modules/cvs/cvs.py
62 @@ -26,7 +26,6 @@ __version__ = "$Id$"
63 #
64 #-------------------------------------------------------------------------------
65
66 -import xml.etree.ElementTree as ET # Python 2.5
67 import re
68
69 from layman.utils import path, run_command
70 @@ -78,16 +77,16 @@ class CvsOverlay(OverlaySource):
71 def update(self, base, src):
72 '''
73 Updates overlay src-url.
74 -
75 +
76 @params base: base location where all overlays are installed.
77 @params src: source URL.
78 '''
79 -
80 +
81 if not self.supported():
82 return 1
83
84 target = path([base, self.parent.name])
85 -
86 +
87 # First echo the new repository to CVS/Root
88 args = [src, '>', '/CVS/Root']
89 result = run_command(self.config, 'echo', args, cmd='echo',
90 @@ -96,12 +95,12 @@ class CvsOverlay(OverlaySource):
91 if result == 0:
92 location = src.split(':')[3]
93 old_location = self.src.split(':/')[3]
94 -
95 +
96 # Check if the repository location needs to be updated too.
97 if not location == old_location:
98 location = re.sub('/', '\/', location)
99 old_location = re.sub('/', '\/', old_location)
100 -
101 +
102 expression = 's/' + old_location + '/' + location + '/'
103
104 # sed -i 's/<old_location>/<new_location>/ <target>/CVS/Repository
105 @@ -110,8 +109,8 @@ class CvsOverlay(OverlaySource):
106 return run_command(self.config, 'sed', args, cmd='sed',
107 cwd=target)
108
109 - return result
110 -
111 + return result
112 +
113
114 def sync(self, base):
115 '''Sync overlay.'''
116
117 diff --git a/layman/overlays/modules/git/git.py b/layman/overlays/modules/git/git.py
118 index 228c2af..341e4e6 100644
119 --- a/layman/overlays/modules/git/git.py
120 +++ b/layman/overlays/modules/git/git.py
121 @@ -26,8 +26,6 @@ __version__ = "$Id: git.py 146 2006-05-27 09:52:36Z wrobel $"
122 #
123 #-------------------------------------------------------------------------------
124
125 -import xml.etree.ElementTree as ET
126 -
127 from layman.utils import path, run_command
128 from layman.overlays.source import OverlaySource, require_supported
129
130 @@ -110,7 +108,7 @@ class GitOverlay(OverlaySource):
131 def update(self, base, src):
132 '''
133 Update overlay src-url
134 -
135 +
136 @params base: base location where all overlays are installed.
137 @params src: source URL.
138 '''
139
140 diff --git a/layman/overlays/modules/mercurial/mercurial.py b/layman/overlays/modules/mercurial/mercurial.py
141 index 0b5e7e5..b104936 100644
142 --- a/layman/overlays/modules/mercurial/mercurial.py
143 +++ b/layman/overlays/modules/mercurial/mercurial.py
144 @@ -28,7 +28,6 @@ __version__ = "$Id: mercurial.py 236 2006-09-05 20:39:37Z wrobel $"
145 #-------------------------------------------------------------------------------
146
147 import re
148 -import xml.etree.ElementTree as ET
149
150 from layman.utils import path, run_command
151 from layman.overlays.source import OverlaySource, require_supported
152 @@ -91,7 +90,7 @@ class MercurialOverlay(OverlaySource):
153 def update(self, base, src):
154 '''
155 Updates overlay src-url.
156 -
157 +
158 @params base: base location where all overlays are installed.
159 @params src: source URL.
160 '''
161
162 diff --git a/layman/overlays/modules/squashfs/squashfs.py b/layman/overlays/modules/squashfs/squashfs.py
163 index d0f3464..58c69f5 100644
164 --- a/layman/overlays/modules/squashfs/squashfs.py
165 +++ b/layman/overlays/modules/squashfs/squashfs.py
166 @@ -26,11 +26,9 @@ from __future__ import unicode_literals
167
168 import os
169 import shutil
170 -import sys
171
172 from layman.constants import FILE_EXTENSIONS
173 from layman.overlays.archive import ArchiveOverlay
174 -from layman.overlays.source import require_supported
175 from layman.utils import path
176
177 #===============================================================================
178
179 diff --git a/layman/overlays/modules/svn/svn.py b/layman/overlays/modules/svn/svn.py
180 index fff8805..c9b4c45 100644
181 --- a/layman/overlays/modules/svn/svn.py
182 +++ b/layman/overlays/modules/svn/svn.py
183 @@ -21,7 +21,6 @@ from __future__ import unicode_literals
184 __version__ = "$Id: svn.py 236 2006-09-05 20:39:37Z wrobel $"
185
186
187 -import os
188 import sys
189 from subprocess import PIPE, Popen
190
191 @@ -93,7 +92,7 @@ class SvnOverlay(OverlaySource):
192 def update(self, base, src):
193 '''
194 Update overlay src-url
195 -
196 +
197 @params base: base location where all overlays are installed.
198 @params src: source URL.
199 '''
200
201 diff --git a/layman/overlays/modules/tar/tar.py b/layman/overlays/modules/tar/tar.py
202 index 7be11de..9c0f0f3 100644
203 --- a/layman/overlays/modules/tar/tar.py
204 +++ b/layman/overlays/modules/tar/tar.py
205 @@ -26,7 +26,6 @@ __version__ = "$Id: tar.py 310 2007-04-09 16:30:40Z wrobel $"
206 #
207 #-------------------------------------------------------------------------------
208
209 -import sys
210
211 from layman.constants import FILE_EXTENSIONS
212 from layman.overlays.archive import ArchiveOverlay