* [gentoo-commits] proj/layman:master commit in: layman/laymanator/
@ 2014-12-08 4:15 Devan Franchini
0 siblings, 0 replies; 7+ messages in thread
From: Devan Franchini @ 2014-12-08 4:15 UTC (permalink / raw
To: gentoo-commits
commit: 0b0e1596cb484bc75e52d50685a4def76295a81a
Author: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 8 03:35:43 2014 +0000
Commit: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
CommitDate: Mon Dec 8 03:35:43 2014 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=0b0e1596
laymanator.py: Adds funny phrases to logging on a successful add/sync
---
layman/laymanator/laymanator.py | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/layman/laymanator/laymanator.py b/layman/laymanator/laymanator.py
index a7cd32b..5594627 100644
--- a/layman/laymanator/laymanator.py
+++ b/layman/laymanator/laymanator.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 = '!!! layman.plugin.create_overlay(), Error: repo not found.'
+ msg = '!!! laymanator sez... Error: repo not found.'
if logger and xterm_titles:
logger(xterm_titles, msg)
writemsg_level(msg + '\n', level=logging.ERROR, noiselevel=-1)
@@ -129,6 +129,9 @@ class Layman(SyncBase):
% ({'repo': self.repo.name})
self.logger(self.xterm_titles, msg)
writemsg_level(msg + "\n")
+ msg = '>>> laymanator sez... "Hasta la add ya, baby!"'
+ self.logger(self.xterm_titles, msg)
+ writemsg_level(msg + "\n")
return (exitcode, True)
@@ -167,6 +170,9 @@ class Layman(SyncBase):
% ({'repo': self.repo.name})
self.logger(self.xterm_titles, msg)
writemsg_level(msg + "\n")
+ msg = '>>> laymanator sez... "Hasta la sync ya, baby!"'
+ self.logger(self.xterm_titles, msg)
+ writemsg_level(msg + "\n")
return (exitcode, True)
@@ -303,6 +309,9 @@ class PyLayman(SyncBase):
% ({'repo': self.repo.name})
self.logger(self.xterm_titles, msg)
writemsg_level(msg + '\n')
+ msg = '>>> laymanator sez... "Hasta la add ya, baby!"'
+ self.logger(self.xterm_titles, msg)
+ writemsg_level(msg + '\n')
return (exitcode, True)
@@ -336,5 +345,8 @@ class PyLayman(SyncBase):
% ({'repo': self.repo.name})
self.logger(self.xterm_titles, msg)
writemsg_level(msg + "\n")
+ msg = '>>> laymanator sez... "Hasta la sync ya, baba!"'
+ self.logger(self.xterm_titles, msg)
+ writemsg_level(msg + "\n")
return (exitcode, True)
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] proj/layman:master commit in: layman/laymanator/
@ 2015-01-12 22:40 Devan Franchini
0 siblings, 0 replies; 7+ messages in thread
From: Devan Franchini @ 2015-01-12 22:40 UTC (permalink / raw
To: gentoo-commits
commit: 2e235241d8177e3b47d7b179aaa4f22c052f6cea
Author: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 14 07:05:23 2014 +0000
Commit: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
CommitDate: Sun Dec 14 07:05:28 2014 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=2e235241
laymanator.py: Modifies subprocess variant of sync plugin _sync()
In order for the behavior of both the subprocess variant and the
API variant of the sync plugin _sync() functions to coincide, the
subprocess variant's function needed to be modified slightly to
add an overlay if it doesn't exist.
---
layman/laymanator/laymanator.py | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/layman/laymanator/laymanator.py b/layman/laymanator/laymanator.py
index 5594627..94f26ee 100644
--- a/layman/laymanator/laymanator.py
+++ b/layman/laymanator/laymanator.py
@@ -141,6 +141,7 @@ class Layman(SyncBase):
emerge_config = self.options.get('emerge_config', None)
portdb = self.options.get('portdb', None)
args = []
+
msg = '>>> Starting layman sync for %(repo)s...'\
% ({'repo': self.repo.name})
self.logger(self.xterm_titles, msg)
@@ -159,13 +160,18 @@ class Layman(SyncBase):
exitcode = portage.process.spawn_bash("%(command)s" % \
({'command': command}),
**portage._native_kwargs(self.spawn_kwargs))
+
if exitcode != os.EX_OK:
- msg = "!!! layman sync error in %(repo)s"\
- % ({'repo': self.repo.name})
- self.logger(self.xterm_titles, msg)
- writemsg_level(msg + "\n", level=logging.ERROR, noiselevel=-1)
- overlay = create_overlay(repo=self.repo, logger=self.logger, xterm_titles=self.xterm_titles)
- return (exitcode, False)
+ exitcode = self.new()[0]
+ if exitcode != os.EX_OK:
+ msg = "!!! layman sync error in %(repo)s"\
+ % ({'repo': self.repo.name})
+ self.logger(self.xterm_titles, msg)
+ writemsg_level(msg + "\n", level=logging.ERROR, noiselevel=-1)
+ return (exitcode, False)
+ else:
+ return (exitcode, True)
+
msg = ">>> layman sync succeeded: %(repo)s"\
% ({'repo': self.repo.name})
self.logger(self.xterm_titles, msg)
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] proj/layman:master commit in: layman/laymanator/
@ 2015-02-02 20:37 Brian Dolbec
0 siblings, 0 replies; 7+ messages in thread
From: Brian Dolbec @ 2015-02-02 20:37 UTC (permalink / raw
To: gentoo-commits
commit: ac77ac4e97aa552a2e28a9e641688dd8605caef7
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 2 20:35:12 2015 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Mon Feb 2 20:36:22 2015 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=ac77ac4e
laymanator.py: Updates for final portage API changes
---
layman/laymanator/laymanator.py | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/layman/laymanator/laymanator.py b/layman/laymanator/laymanator.py
index 94f26ee..c00ec0d 100644
--- a/layman/laymanator/laymanator.py
+++ b/layman/laymanator/laymanator.py
@@ -19,7 +19,7 @@ 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 SyncBase
+from portage.sync.syncbase import NewBase
import sys
@@ -58,7 +58,7 @@ def create_overlay_package(config=None, repo=None, logger=None, xterm_titles=Non
return None
-class Layman(SyncBase):
+class Layman(NewBase):
'''
Layman sync class which makes use of a subprocess call to
execute desired layman actions.
@@ -77,7 +77,7 @@ class Layman(SyncBase):
def __init__(self):
- SyncBase.__init__(self, 'layman', 'app-portage/layman')
+ NewBase.__init__(self, 'layman', 'app-portage/layman')
def _get_optargs(self, args):
@@ -136,7 +136,7 @@ class Layman(SyncBase):
return (exitcode, True)
- def _sync(self):
+ def update(self):
''' Update existing repository'''
emerge_config = self.options.get('emerge_config', None)
portdb = self.options.get('portdb', None)
@@ -183,7 +183,7 @@ class Layman(SyncBase):
return (exitcode, True)
-class PyLayman(SyncBase):
+class PyLayman(NewBase):
'''
Layman sync class which makes use of layman's modules to
perform desired actions.
@@ -201,7 +201,7 @@ class PyLayman(SyncBase):
return "Layman"
def __init__(self):
- SyncBase.__init__(self, 'layman', 'app-portage/layman')
+ NewBase.__init__(self, 'layman', 'app-portage/layman')
self._layman = None
self.storage = ''
@@ -321,7 +321,7 @@ class PyLayman(SyncBase):
return (exitcode, True)
- def _sync(self):
+ def update(self):
''' Update existing repository'''
layman_inst = self._get_layman_api()
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] proj/layman:master commit in: layman/laymanator/
@ 2015-02-02 23:12 Devan Franchini
0 siblings, 0 replies; 7+ messages in thread
From: Devan Franchini @ 2015-02-02 23:12 UTC (permalink / raw
To: gentoo-commits
commit: 2207127cab206a8db0b4a6605caabb7ba28d8b3b
Author: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 2 23:12:53 2015 +0000
Commit: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
CommitDate: Mon Feb 2 23:12:53 2015 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=2207127c
laymanator/__init__.py: Modifies values to reflect plugin name
---
layman/laymanator/__init__.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/layman/laymanator/__init__.py b/layman/laymanator/__init__.py
index 5da9114..3d37fb9 100644
--- a/layman/laymanator/__init__.py
+++ b/layman/laymanator/__init__.py
@@ -27,11 +27,11 @@ except KeyError:
print("Using config class: " + config_class)
module_spec = {
- 'name': 'layman',
+ 'name': 'laymanator',
'description': __doc__,
'provides':{
'layman-module': {
- 'name': 'layman',
+ 'name': 'laymanator',
'class': config_class,
'description': __doc__,
'functions': ['sync', 'new', 'exists'],
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] proj/layman:master commit in: layman/laymanator/
@ 2015-02-02 23:49 Devan Franchini
0 siblings, 0 replies; 7+ messages in thread
From: Devan Franchini @ 2015-02-02 23:49 UTC (permalink / raw
To: gentoo-commits
commit: 322b86611f1bb05aa20f30c3576faf7e4dfd7ae6
Author: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 2 23:47:39 2015 +0000
Commit: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
CommitDate: Mon Feb 2 23:47:44 2015 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=322b8661
laymanator/__init__.py: Modifies method in which config_class is set
Also removes unnecessary debug code that will not be used in production
---
layman/laymanator/__init__.py | 17 ++++-------------
1 file changed, 4 insertions(+), 13 deletions(-)
diff --git a/layman/laymanator/__init__.py b/layman/laymanator/__init__.py
index 3d37fb9..62540ba 100644
--- a/layman/laymanator/__init__.py
+++ b/layman/laymanator/__init__.py
@@ -10,21 +10,12 @@ import os
from portage.sync.config_checks import CheckSyncConfig
-DEFAULT_CLASS = 'Layman'
-AVAILABLE_CLASSES = [ 'Layman', 'PyLayman']
-options = {'1': 'Layman', '2': 'PyLayman'}
-
-
-config_class = DEFAULT_CLASS
try:
- test_param = os.environ["TESTIT"]
- if str(test_param) in options:
- config_class = options[test_param]
-except KeyError:
- pass
-
+ import layman
+ config_class = 'PyLayman'
+except ImportError:
+ config_class = 'Layman'
-print("Using config class: " + config_class)
module_spec = {
'name': 'laymanator',
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] proj/layman:master commit in: layman/laymanator/
@ 2015-02-04 17:13 Devan Franchini
0 siblings, 0 replies; 7+ messages in thread
From: Devan Franchini @ 2015-02-04 17:13 UTC (permalink / raw
To: gentoo-commits
commit: 69b440f93cd3e7d83183eff1e1caaaa8ea844fef
Author: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 4 16:55:29 2015 +0000
Commit: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
CommitDate: Wed Feb 4 16:55:29 2015 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=69b440f9
laymanator/__init__.py: Adds a delete of layman object after import check
---
layman/laymanator/__init__.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/layman/laymanator/__init__.py b/layman/laymanator/__init__.py
index 62540ba..890302c 100644
--- a/layman/laymanator/__init__.py
+++ b/layman/laymanator/__init__.py
@@ -13,6 +13,7 @@ from portage.sync.config_checks import CheckSyncConfig
try:
import layman
config_class = 'PyLayman'
+ del layman
except ImportError:
config_class = 'Layman'
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] proj/layman:master commit in: layman/laymanator/
@ 2015-02-05 21:46 Devan Franchini
0 siblings, 0 replies; 7+ messages in thread
From: Devan Franchini @ 2015-02-05 21:46 UTC (permalink / raw
To: gentoo-commits
commit: 392bf16694a9782d7d92308728fde847a1a03f06
Author: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 5 21:45:54 2015 +0000
Commit: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
CommitDate: Thu Feb 5 21:46:01 2015 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=392bf166
laymanator.py: Corrects misspelling of "baby" in sync plugin output
---
layman/laymanator/laymanator.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/layman/laymanator/laymanator.py b/layman/laymanator/laymanator.py
index c00ec0d..d5d81ee 100644
--- a/layman/laymanator/laymanator.py
+++ b/layman/laymanator/laymanator.py
@@ -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, baba!"'
+ msg = '>>> laymanator sez... "Hasta la sync ya, baby!"'
self.logger(self.xterm_titles, msg)
writemsg_level(msg + "\n")
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-02-05 21:46 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-08 4:15 [gentoo-commits] proj/layman:master commit in: layman/laymanator/ Devan Franchini
-- strict thread matches above, loose matches on Subject: below --
2015-01-12 22:40 Devan Franchini
2015-02-02 20:37 Brian Dolbec
2015-02-02 23:12 Devan Franchini
2015-02-02 23:49 Devan Franchini
2015-02-04 17:13 Devan Franchini
2015-02-05 21:46 Devan Franchini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox