[gentoo-commits] proj/layman:master commit in: pm_plugins/portage/sync/modules/laymansync/

2020-04-24 Thread Brian Dolbec
commit: 8241372090c46c4ac6393189051909950b056453
Author: Brian Dolbec  gentoo  org>
AuthorDate: Fri Apr 24 12:39:06 2020 +
Commit: Brian Dolbec  gentoo  org>
CommitDate: Fri Apr 24 13:56:48 2020 +
URL:https://gitweb.gentoo.org/proj/layman.git/commit/?id=82413720

laymansync.pylayman.py: Fix bug 674594  typo

Signed-off-by: Brian Dolbec  gentoo.org>

 pm_plugins/portage/sync/modules/laymansync/pylayman.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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,



[gentoo-commits] proj/layman:master commit in: pm_plugins/portage/sync/modules/laymansync/

2017-06-22 Thread Devan Franchini
commit: 22e1bd138dbcf32ca50f9659c9d847fdae11a5f0
Author: Zac Medico  gentoo  org>
AuthorDate: Sun Apr  9 21:54:17 2017 +
Commit: Devan Franchini  gentoo  org>
CommitDate: Fri Jun 23 00:05:40 2017 +
URL:https://gitweb.gentoo.org/proj/layman.git/commit/?id=22e1bd13

pm_plugins/portage: drop portage._native_kwargs usage (bug 613936)

The portage._native_kwargs function is not available since
portage-2.3.0.

X-Gentoo-Bug: 613936
X-Gentoo-Bug-URL: https://bugs.gentoo.org/613936

 pm_plugins/portage/sync/modules/laymansync/subproc.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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]



[gentoo-commits] proj/layman:master commit in: pm_plugins/portage/sync/modules/laymansync/

2016-04-29 Thread Brian Dolbec
commit: 53b41cb4d01a7b6f31d09f7fdb0a0292b633b7e3
Author: Brian Dolbec  gentoo  org>
AuthorDate: Fri Apr 29 23:17:39 2016 +
Commit: Brian Dolbec  gentoo  org>
CommitDate: Fri Apr 29 23:17:39 2016 +
URL:https://gitweb.gentoo.org/proj/layman.git/commit/?id=53b41cb4

laymansync: Update module_spec for the change in portage's module.py

 pm_plugins/portage/sync/modules/laymansync/__init__.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/pm_plugins/portage/sync/modules/laymansync/__init__.py 
b/pm_plugins/portage/sync/modules/laymansync/__init__.py
index d80f885..c704011 100644
--- a/pm_plugins/portage/sync/modules/laymansync/__init__.py
+++ b/pm_plugins/portage/sync/modules/laymansync/__init__.py
@@ -15,6 +15,7 @@ module_spec = {
 'provides':{
 'layman-module': {
 'name': 'laymansync',
+'sourcefile': 'laymansync',
 'class': 'CONFIG_CLASS',
 'description': __doc__,
 'functions': ['sync', 'new', 'exists'],



[gentoo-commits] proj/layman:master commit in: pm_plugins/portage/sync/modules/laymansync/

2015-05-05 Thread Devan Franchini
commit: 8eea549fd4f61b55a3939a0da2682f1749e474fb
Author: Devan Franchini twitch153 AT gentoo DOT org
AuthorDate: Wed May  6 01:12:52 2015 +
Commit: Devan Franchini twitch153 AT gentoo DOT org
CommitDate: Wed May  6 01:12:52 2015 +
URL:https://gitweb.gentoo.org/proj/layman.git/commit/?id=8eea549f

laymansync.py: Corrects importing of sync classes

 pm_plugins/portage/sync/modules/laymansync/laymansync.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pm_plugins/portage/sync/modules/laymansync/laymansync.py 
b/pm_plugins/portage/sync/modules/laymansync/laymansync.py
index 9835beb..12ebe2d 100644
--- a/pm_plugins/portage/sync/modules/laymansync/laymansync.py
+++ b/pm_plugins/portage/sync/modules/laymansync/laymansync.py
@@ -5,9 +5,9 @@
 
 
 try:
-from pylayman import PyLayman
+from portage.sync.modules.laymansync.pylayman import PyLayman
 CONFIG_CLASS = PyLayman
 except ImportError:
-from subproc import Layman
+from portage.sync.modules.laymansync.subproc import Layman
 CONFIG_CLASS = Layman
 



[gentoo-commits] proj/layman:master commit in: pm_plugins/portage/sync/modules/laymansync/

2015-05-04 Thread Brian Dolbec
commit: 34be556371a0c40dfbf821996fc40f5720f4bf95
Author: Brian Dolbec dolsen AT gentoo DOT org
AuthorDate: Mon May  4 17:36:45 2015 +
Commit: Brian Dolbec dolsen AT gentoo DOT org
CommitDate: Mon May  4 17:38:14 2015 +
URL:https://gitweb.gentoo.org/proj/layman.git/commit/?id=34be5563

pm_plugins/portage: Split up laymansync into sub-files to delay import of 
layman bug 548328

The laymansync module prevented emerge from operating due to the layman import 
in the module's __init__.py.
There was breakage in the cryptography import due to an openssl USE flag change 
and re-compile.
This caused the chain reaction traceback preventing emerge from running.

 .../portage/sync/modules/laymansync/__init__.py|  11 +-
 .../portage/sync/modules/laymansync/laymansync.py  | 357 +
 .../laymansync/{laymansync.py = pylayman.py}  | 138 +---
 .../portage/sync/modules/laymansync/subproc.py | 136 
 4 files changed, 147 insertions(+), 495 deletions(-)

diff --git a/pm_plugins/portage/sync/modules/laymansync/__init__.py 
b/pm_plugins/portage/sync/modules/laymansync/__init__.py
index de06b03..d80f885 100644
--- a/pm_plugins/portage/sync/modules/laymansync/__init__.py
+++ b/pm_plugins/portage/sync/modules/laymansync/__init__.py
@@ -5,26 +5,17 @@
 Performs layman sync actions for layman overlays.
 '''
 
-import os
 
 from portage.sync.config_checks import CheckSyncConfig
 
 
-try:
-import layman
-config_class = 'PyLayman'
-del layman
-except ImportError:
-config_class = 'Layman'
-
-
 module_spec = {
 'name': 'laymansync',
 'description': __doc__,
 'provides':{
 'layman-module': {
 'name': 'laymansync',
-'class': config_class,
+'class': 'CONFIG_CLASS',
 'description': __doc__,
 'functions': ['sync', 'new', 'exists'],
 'func_desc': {

diff --git a/pm_plugins/portage/sync/modules/laymansync/laymansync.py 
b/pm_plugins/portage/sync/modules/laymansync/laymansync.py
index 1156c61..9835beb 100644
--- a/pm_plugins/portage/sync/modules/laymansync/laymansync.py
+++ b/pm_plugins/portage/sync/modules/laymansync/laymansync.py
@@ -2,357 +2,12 @@
 # Distributed under the terms of the GNU General Public License v2
 '''Layman module for portage'''
 
-import logging
 
-import layman.overlays.overlay as Overlay
 
-from layman.api import LaymanAPI
-from layman.config import BareConfig, OptionConfig
-from layman.maker import Interactive
-from layman.output import Message
-from layman.utils import reload_config
+try:
+from pylayman import PyLayman
+CONFIG_CLASS = PyLayman
+except ImportError:
+from subproc import Layman
+CONFIG_CLASS = Layman
 
-import portage
-from portage import os
-from portage.util import writemsg_level
-from portage.output import create_color_func
-good = create_color_func(GOOD)
-bad = create_color_func(BAD)
-warn = create_color_func(WARN)
-from portage.sync.syncbase import NewBase
-
-import sys
-
-def create_overlay_package(config=None, repo=None, logger=None, 
xterm_titles=None):
-'''
-Creates a layman overlay object
-from the given repos.conf repo info.
-
-@params config: layman.config class object
-@params repo: portage.repo class object
-@rtype tuple: overlay name and layman.overlay object or None
-'''
-if repo:
-overlay = {'sources': []}
-desc = 'Defined and created from info in %(repo)s config file...'\
-% ({'repo': repo.name})
-if not config:
-config = BareConfig()
-if not repo.branch:
-repo.branch = ''
-
-overlay['name'] = repo.name
-overlay['descriptions'] = [desc]
-overlay['owner_name'] = 'repos.conf'
-overlay['owner_email'] = '127.0.0.1'
-overlay['sources'].append([repo.sync_uri, repo.layman_type, 
repo.branch])
-overlay['priority'] = repo.priority
-
-ovl = Overlay.Overlay(config=config, ovl_dict=overlay, ignore=1)
-return (repo.name, ovl)
-
-msg = '!!! laymansync sez... Error: repo not found.'
-if logger and xterm_titles:
-logger(xterm_titles, msg)
-writemsg_level(msg + '\n', level=logging.ERROR, noiselevel=-1)
-return None
-
-
-class Layman(NewBase):
-'''
-Layman sync class which makes use of a subprocess call to
-execute desired layman actions.
-'''
-
-short_desc = Perform sync operations on layman based repositories
-
-@staticmethod
-def name():
-'''
-Returns sync plugin name.
-
-@rtype str
-'''
-return Layman
-
-
-def __init__(self):
-NewBase.__init__(self, 'layman', 'app-portage/layman')
-
-
-def _get_optargs(self, args):
-'''
-Gets optional layman arguments.
-
-@params args: dict of current subprocess args.
-'''
-if self.settings:
-if self.settings.get('NOCOLOR'):
-args.append('-N')

[gentoo-commits] proj/layman:master commit in: pm_plugins/portage/sync/modules/laymansync/

2015-02-07 Thread Devan Franchini
commit: c69868655e387bbeb646b6326d64380f8a4247be
Author: Devan Franchini twitch153 AT gentoo DOT org
AuthorDate: Sun Feb  8 00:34:57 2015 +
Commit: Devan Franchini twitch153 AT gentoo DOT org
CommitDate: Sun Feb  8 00:34:57 2015 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=c6986865

laymansync.py: Changes output messages from laymanator to laymansync

---
 pm_plugins/portage/sync/modules/laymansync/laymansync.py | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/pm_plugins/portage/sync/modules/laymansync/laymansync.py 
b/pm_plugins/portage/sync/modules/laymansync/laymansync.py
index d5d81ee..1156c61 100644
--- a/pm_plugins/portage/sync/modules/laymansync/laymansync.py
+++ b/pm_plugins/portage/sync/modules/laymansync/laymansync.py
@@ -51,7 +51,7 @@ def create_overlay_package(config=None, repo=None, 
logger=None, xterm_titles=Non
 ovl = Overlay.Overlay(config=config, ovl_dict=overlay, ignore=1)
 return (repo.name, ovl)
 
-msg = '!!! laymanator sez... Error: repo not found.'
+msg = '!!! laymansync sez... Error: repo not found.'
 if logger and xterm_titles:
 logger(xterm_titles, msg)
 writemsg_level(msg + '\n', level=logging.ERROR, noiselevel=-1)
@@ -129,7 +129,7 @@ class Layman(NewBase):
 % ({'repo': self.repo.name})
 self.logger(self.xterm_titles, msg)
 writemsg_level(msg + \n)
-msg = ' laymanator sez... Hasta la add ya, baby!'
+msg = ' laymansync sez... Hasta la add ya, baby!'
 self.logger(self.xterm_titles, msg)
 writemsg_level(msg + \n)
 
@@ -176,7 +176,7 @@ class Layman(NewBase):
 % ({'repo': self.repo.name})
 self.logger(self.xterm_titles, msg)
 writemsg_level(msg + \n)
-msg = ' laymanator sez... Hasta la sync ya, baby!'
+msg = ' laymansync sez... Hasta la sync ya, baby!'
 self.logger(self.xterm_titles, msg)
 writemsg_level(msg + \n)
 
@@ -315,7 +315,7 @@ class PyLayman(NewBase):
 % ({'repo': self.repo.name})
 self.logger(self.xterm_titles, msg)
 writemsg_level(msg + '\n')
-msg = ' laymanator sez... Hasta la add ya, baby!'
+msg = ' laymansync sez... Hasta la add ya, baby!'
 self.logger(self.xterm_titles, msg)
 writemsg_level(msg + '\n')
 
@@ -351,7 +351,7 @@ class PyLayman(NewBase):
 % ({'repo': self.repo.name})
 self.logger(self.xterm_titles, msg)
 writemsg_level(msg + \n)
-msg = ' laymanator sez... Hasta la sync ya, baby!'
+msg = ' laymansync sez... Hasta la sync ya, baby!'
 self.logger(self.xterm_titles, msg)
 writemsg_level(msg + \n)