aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--layman/db.py1
-rwxr-xr-xlayman/overlays/overlay.py19
-rw-r--r--layman/remotedb.py5
3 files changed, 19 insertions, 6 deletions
diff --git a/layman/db.py b/layman/db.py
index d67ea87..9b32952 100644
--- a/layman/db.py
+++ b/layman/db.py
@@ -111,6 +111,7 @@ class DB(DbBase):
if overlay.name not in self.overlays.keys():
if not self._check_official(overlay):
return False
+ self.output.debug('RemoteDB.__init__(), DB.add overlay.add() call', 4)
result = overlay.add(self.config['storage'])
if result == 0:
if 'priority' in self.config.keys():
diff --git a/layman/overlays/overlay.py b/layman/overlays/overlay.py
index 9cbeb99..03829a8 100755
--- a/layman/overlays/overlay.py
+++ b/layman/overlays/overlay.py
@@ -95,8 +95,9 @@ class Overlay(object):
def add(self, base):
res = 1
first_s = True
-
+ self.output.debug('Overlay.add()', 5)
self.sources = self.filter_protocols(self.sources)
+ self.output.debug('Overlay.add(), filtered protocols, sources:' + str(self.sources), 5)
if not self.sources:
msg = 'Overlay.add() error: overlay "%(name)s" does not support '\
' the given\nprotocol(s) %(protocol)s and cannot be '\
@@ -110,10 +111,12 @@ class Overlay(object):
if not first_s:
self.output.info('\nTrying next source of listed sources...', 4)
try:
+ self.output.debug('Overlay.add(), s.add(base)', 5)
res = s.add(base)
if res == 0:
# Worked, throw other sources away
self.sources = [s]
+ self.output.debug('Overlay.add(), back from s.add(base)', 5)
break
except Exception as error:
self.output.warn(str(error), 4)
@@ -132,11 +135,17 @@ class Overlay(object):
from the overlay's sources.
'''
_sources = []
- if not self.config['protocol_filter']:
+ self.output.debug('Overlay.filter_protocols()', 5)
+ self.output.debug('Overlay.filter_protocols() filters:' + str(type(self.config['protocol_filter'])), 5)
+ if not self.config['protocol_filter'] and not self.config['protocol_filter'] == []:
+ self.output.debug('Overlay.filter_protocols() no protocol_filter, returning', 5)
return sources
-
+ self.output.debug('Overlay.filter_protocols() sources:' + str(sources), 5)
for source in sources:
+ self.output.debug('Overlay.filter_protocols() source:' + str(type(source)), 5)
+ self.output.debug('Overlay.filter_protocols() filters:' + str(self.config['protocol_filter']), 5)
for protocol in self.config['protocol_filter']:
+ self.output.debug('Overlay.filter_protocols() protocol: ' + protocol + ' ' + str(type(protocol)), 5)
protocol = protocol.lower()
#re.search considers "\+" as the literal "+".
if protocol == 'git+ssh':
@@ -144,7 +153,7 @@ class Overlay(object):
protocol += '://'
if re.search('^' + protocol, source.src):
_sources.append(source)
-
+ self.output.debug('Overlay.filter_protocols(), returning sources' + str(_sources), 5)
return _sources
@@ -792,7 +801,7 @@ class Overlay(object):
try:
res = self.sources[0].update(base, src)
if res == 0:
- # Updating it worked, no need to bother
+ # Updating it worked, no need to bother
# checking other sources.
self.sources[0].src = src
result = True
diff --git a/layman/remotedb.py b/layman/remotedb.py
index 2df0c63..6e75bec 100644
--- a/layman/remotedb.py
+++ b/layman/remotedb.py
@@ -83,15 +83,18 @@ class RemoteDB(DbBase):
self.output.debug('RemoteDB.__init__(), paths to load = %s' %str(paths),
2)
if config['nocheck']:
+ self.output.debug('RemoteDB.__init__(), ignore = 2', 5)
ignore = 2
else:
+ self.output.debug('RemoteDB.__init__(), ignore = 0', 5)
ignore = 0
#quiet = int(config['quietness']) < 3
-
+ self.output.debug('RemoteDB.__init__(), DbBase.__init__() call', 5)
DbBase.__init__(self, config, paths=paths, ignore=ignore,
ignore_init_read_errors=ignore_init_read_errors)
+ self.output.debug('RemoteDB.__init__(), back from DbBase.__init__() call', 5)
self.gpg = None
self.gpg_config = None