summaryrefslogtreecommitdiffstats
path: root/layman/overlays/git.py
diff options
context:
space:
mode:
authorSebastian Pipping <sebastian@pipping.org>2010-01-13 02:38:44 +0100
committerSebastian Pipping <sebastian@pipping.org>2010-01-13 02:47:29 +0100
commit2a14ba6689f6104601533d0677fb9211a35c96e0 (patch)
treec51921ddd2e0885a3d599de6665d48a2fa849ae7 /layman/overlays/git.py
parent82643d91c7814033626885285ee51ac06e66cbe9 (diff)
downloadlayman-2a14ba6689f6104601533d0677fb9211a35c96e0.tar.gz
layman-2a14ba6689f6104601533d0677fb9211a35c96e0.tar.bz2
layman-2a14ba6689f6104601533d0677fb9211a35c96e0.zip
Add support for multiple sources per overlay
Diffstat (limited to 'layman/overlays/git.py')
-rw-r--r--layman/overlays/git.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/layman/overlays/git.py b/layman/overlays/git.py
index b3c3a2b..174de18 100644
--- a/layman/overlays/git.py
+++ b/layman/overlays/git.py
@@ -25,7 +25,6 @@ __version__ = "$Id: git.py 146 2006-05-27 09:52:36Z wrobel $"
#-------------------------------------------------------------------------------
from layman.utils import path
-from layman.overlays.overlay import Overlay
from layman.overlays.source import OverlaySource
#===============================================================================
@@ -40,9 +39,9 @@ class GitOverlay(OverlaySource):
type = 'Git'
type_key = 'git'
- def __init__(self, xml, config, ignore = 0, quiet = False):
+ def __init__(self, parent, xml, config, _location, ignore = 0, quiet = False):
- super(GitOverlay, self).__init__(xml, config, ignore)
+ super(GitOverlay, self).__init__(parent, xml, config, _location, ignore, quiet)
def add(self, base, quiet = False):
'''Add overlay.'''
@@ -59,7 +58,7 @@ class GitOverlay(OverlaySource):
if self.src.split(':')[0] == 'http':
slash = '/'
return self.cmd(self.command() + ' clone ' + quiet_option + '"' + self.src + slash
- + '" "' + path([base, self.name]) + '"')
+ + '" "' + path([base, self.parent.name]) + '"')
def sync(self, base, quiet = False):
'''Sync overlay.'''
@@ -71,7 +70,7 @@ class GitOverlay(OverlaySource):
else:
quiet_option = ''
- return self.cmd('cd "' + path([base, self.name]) + '" && '
+ return self.cmd('cd "' + path([base, self.parent.name]) + '" && '
+ self.command() + ' pull' + quiet_option)
def supported(self):