aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--CHANGES7
-rwxr-xr-xbin/layman6
-rw-r--r--layman/config.py2
-rw-r--r--layman/db.py1
-rwxr-xr-xlayman/overlays/overlay.py19
-rw-r--r--layman/remotedb.py5
-rwxr-xr-xlayman/tests/external.py6
-rw-r--r--layman/version.py2
-rw-r--r--pm_plugins/portage/sync/modules/laymansync/pylayman.py2
-rw-r--r--pm_plugins/portage/sync/modules/laymansync/subproc.py4
11 files changed, 40 insertions, 16 deletions
diff --git a/.gitignore b/.gitignore
index 4b1721a..20319a6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
*~
*.pyc
+*.pyo
/doc/layman.8
/doc/layman.8.html
/doc/docbook-xsl.css
@@ -8,3 +9,4 @@
*.patch
testpath
/misc/*
+*.geany
diff --git a/CHANGES b/CHANGES
index 14bf02c..e829179 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,13 @@
CHANGES
-------
+Version 2.4.3 - Release 2020-04-24
+==================================
+ - Bug 613936 Drop portage_native_kwargs
+ - Bug 674594 typo in laymansync.pylayman.py
+ - Fix python 3.7 and python 3.8 compatibility
+ - several more typo fixes, added more debug statements...
+
Version 2.4.2 - Release 2017-02-01
==================================
- Bug 587474 Fix a missed eprefix placeholder for repos_conf setting.
diff --git a/bin/layman b/bin/layman
index fbb793b..0c8f061 100755
--- a/bin/layman
+++ b/bin/layman
@@ -20,6 +20,12 @@ __version__ = "0.2"
import os
+# Used for running live development code only
+#import sys
+#print(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+#sys.path.insert(0,os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+
+
#===============================================================================
#
# Dependencies
diff --git a/layman/config.py b/layman/config.py
index 853e22f..bc3172b 100644
--- a/layman/config.py
+++ b/layman/config.py
@@ -96,7 +96,7 @@ class BareConfig(object):
'cache' : '%(storage)s/cache',
'local_list': '%(storage)s/overlays.xml',
'installed': '%(storage)s/installed.xml',
- 'protocol_filter': [],
+ 'protocol_filter': '',
'auto_sync': 'No',
'check_official': 'Yes',
'conf_type': 'repos.conf',
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
diff --git a/layman/tests/external.py b/layman/tests/external.py
index f2b18cd..e6f408d 100755
--- a/layman/tests/external.py
+++ b/layman/tests/external.py
@@ -14,9 +14,6 @@
# Sebastian Pipping <sebastian@pipping.org>
#
-from __future__ import print_function
-from __future__ import unicode_literals
-
'''Runs external (non-doctest) test cases.'''
import os
@@ -452,7 +449,7 @@ class FetchRemoteList(unittest.TestCase):
available = api.get_available()
self.assertEqual(available, ['wrobel', 'wrobel-stable'])
-
+
# Test the info of an overlay.
info = api.get_info_str(['wrobel'], verbose=True, local=False)
test_info = 'wrobel\n~~~~~~\nSource : https://overlays.gentoo.org'\
@@ -769,4 +766,3 @@ class RemoteDBCache(unittest.TestCase):
if __name__ == '__main__':
filterwarnings('ignore')
unittest.main()
- resetwarnings()
diff --git a/layman/version.py b/layman/version.py
index 402a339..966582c 100644
--- a/layman/version.py
+++ b/layman/version.py
@@ -24,7 +24,7 @@ from __future__ import unicode_literals
__version__ = "$Id: version.py 309 2007-04-09 16:23:38Z wrobel $"
-VERSION = '2.4.2'
+VERSION = '2.4.3'
if __name__ == '__main__':
print(VERSION)
diff --git a/pm_plugins/portage/sync/modules/laymansync/pylayman.py b/pm_plugins/portage/sync/modules/laymansync/pylayman.py
index 5682135..8e3bc24 100644
--- a/pm_plugins/portage/sync/modules/laymansync/pylayman.py
+++ b/pm_plugins/portage/sync/modules/laymansync/pylayman.py
@@ -161,7 +161,7 @@ class PyLayman(NewBase):
if self.repo.name not in available_overlays:
overlay_package = create_overlay_package(repo=self.repo,\
logger=self.logger,\
- xterm_titles=self.xter_titles)
+ xterm_titles=self.xterm_titles)
create_overlay_xml = Interactive(config=self.config)
path = self.config.get_option('overlay_defs') + '/reposconf.xml'
result = create_overlay_xml(overlay_package=overlay_package,
diff --git a/pm_plugins/portage/sync/modules/laymansync/subproc.py b/pm_plugins/portage/sync/modules/laymansync/subproc.py
index 1166841..477bb46 100644
--- a/pm_plugins/portage/sync/modules/laymansync/subproc.py
+++ b/pm_plugins/portage/sync/modules/laymansync/subproc.py
@@ -72,7 +72,7 @@ class Layman(NewBase):
exitcode = portage.process.spawn_bash("%(command)s" % \
({'command': command}),
- **portage._native_kwargs(self.spawn_kwargs))
+ **self.spawn_kwargs)
if exitcode != os.EX_OK:
msg = "!!! layman add error in %(repo)s"\
% ({'repo': self.repo.name})
@@ -111,7 +111,7 @@ class Layman(NewBase):
command = ' '.join(args)
exitcode = portage.process.spawn_bash("%(command)s" % \
({'command': command}),
- **portage._native_kwargs(self.spawn_kwargs))
+ **self.spawn_kwargs)
if exitcode != os.EX_OK:
exitcode = self.new()[0]