* [gentoo-commits] proj/portage:plugin-sync commit in: pym/portage/emaint/modules/merges/
2014-12-04 20:16 [gentoo-commits] proj/portage:master commit in: pym/portage/emaint/modules/merges/ Brian Dolbec
@ 2014-12-04 20:04 ` Brian Dolbec
0 siblings, 0 replies; 4+ messages in thread
From: Brian Dolbec @ 2014-12-04 20:04 UTC (permalink / raw
To: gentoo-commits
commit: ca7966d72cdb1522d3d29536a07c7bb8d7ecaa3f
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 21 02:09:01 2014 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Thu Dec 4 19:56:35 2014 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=ca7966d7
MergesHandler: don't use load_emerge_config
Use the old portage.db API since load_emerge_config isn't really
needed here. In order to reload the config, use
portage._reset_legacy_globals().
---
pym/portage/emaint/modules/merges/merges.py | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/pym/portage/emaint/modules/merges/merges.py b/pym/portage/emaint/modules/merges/merges.py
index 1a67cb5..7146c76 100644
--- a/pym/portage/emaint/modules/merges/merges.py
+++ b/pym/portage/emaint/modules/merges/merges.py
@@ -1,8 +1,6 @@
# Copyright 2005-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-from _emerge.actions import load_emerge_config
-
import portage
from portage import os, _unicode_encode
from portage.const import MERGING_IDENTIFIER, PORTAGE_BIN_PATH, PRIVATE_PATH, \
@@ -174,8 +172,7 @@ class MergesHandler(object):
@type pkg_invalid_entries: set
"""
- emerge_config = load_emerge_config()
- portdb = emerge_config.target_config.trees['porttree'].dbapi
+ portdb = portage.db[portage.root]['porttree'].dbapi
for failed_pkg in failed_pkgs:
# validate pkg name
pkg_name = '%s' % failed_pkg.replace(MERGING_IDENTIFIER, '')
@@ -271,8 +268,8 @@ class MergesHandler(object):
for pkg in sorted(self._scan()):
results.append("'%s' still found as a failed merge." % pkg)
# reload config and remove successful packages from tracking file
- emerge_config = load_emerge_config()
- vardb = emerge_config.target_config.trees['vartree'].dbapi
+ portage._reset_legacy_globals()
+ vardb = portage.db[portage.root]['vartree'].dbapi
still_failed_pkgs = {}
for pkg, mtime in failed_pkgs.items():
pkg_name = '%s' % pkg.replace(MERGING_IDENTIFIER, '')
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/emaint/modules/merges/
@ 2014-12-04 20:16 Brian Dolbec
2014-12-04 20:04 ` [gentoo-commits] proj/portage:plugin-sync " Brian Dolbec
0 siblings, 1 reply; 4+ messages in thread
From: Brian Dolbec @ 2014-12-04 20:16 UTC (permalink / raw
To: gentoo-commits
commit: ca7966d72cdb1522d3d29536a07c7bb8d7ecaa3f
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 21 02:09:01 2014 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Thu Dec 4 19:56:35 2014 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=ca7966d7
MergesHandler: don't use load_emerge_config
Use the old portage.db API since load_emerge_config isn't really
needed here. In order to reload the config, use
portage._reset_legacy_globals().
---
pym/portage/emaint/modules/merges/merges.py | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/pym/portage/emaint/modules/merges/merges.py b/pym/portage/emaint/modules/merges/merges.py
index 1a67cb5..7146c76 100644
--- a/pym/portage/emaint/modules/merges/merges.py
+++ b/pym/portage/emaint/modules/merges/merges.py
@@ -1,8 +1,6 @@
# Copyright 2005-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-from _emerge.actions import load_emerge_config
-
import portage
from portage import os, _unicode_encode
from portage.const import MERGING_IDENTIFIER, PORTAGE_BIN_PATH, PRIVATE_PATH, \
@@ -174,8 +172,7 @@ class MergesHandler(object):
@type pkg_invalid_entries: set
"""
- emerge_config = load_emerge_config()
- portdb = emerge_config.target_config.trees['porttree'].dbapi
+ portdb = portage.db[portage.root]['porttree'].dbapi
for failed_pkg in failed_pkgs:
# validate pkg name
pkg_name = '%s' % failed_pkg.replace(MERGING_IDENTIFIER, '')
@@ -271,8 +268,8 @@ class MergesHandler(object):
for pkg in sorted(self._scan()):
results.append("'%s' still found as a failed merge." % pkg)
# reload config and remove successful packages from tracking file
- emerge_config = load_emerge_config()
- vardb = emerge_config.target_config.trees['vartree'].dbapi
+ portage._reset_legacy_globals()
+ vardb = portage.db[portage.root]['vartree'].dbapi
still_failed_pkgs = {}
for pkg, mtime in failed_pkgs.items():
pkg_name = '%s' % pkg.replace(MERGING_IDENTIFIER, '')
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/emaint/modules/merges/
@ 2015-02-21 19:52 Pavel Kazakov
0 siblings, 0 replies; 4+ messages in thread
From: Pavel Kazakov @ 2015-02-21 19:52 UTC (permalink / raw
To: gentoo-commits
commit: 2809b7cfcb889bbc76a61fdbce7d58599aa36c56
Author: Pavel Kazakov <nullishzero <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 21 19:31:17 2015 +0000
Commit: Pavel Kazakov <nullishzero <AT> gentoo <DOT> org>
CommitDate: Sat Feb 21 19:31:17 2015 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=2809b7cf
emaint merges: Fix call to emerge
Due to a change to the constant PORTAGE_BIN_PATH, the emaint merges
module needs to be updated to properly call the emerge command.
Furthermore, the --ask flag is set to prompt users before attempting
to emerge any packages--thanks to Nikoli for the idea.
---
pym/portage/emaint/modules/merges/merges.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/pym/portage/emaint/modules/merges/merges.py b/pym/portage/emaint/modules/merges/merges.py
index 7146c76..8f677c2 100644
--- a/pym/portage/emaint/modules/merges/merges.py
+++ b/pym/portage/emaint/modules/merges/merges.py
@@ -3,8 +3,7 @@
import portage
from portage import os, _unicode_encode
-from portage.const import MERGING_IDENTIFIER, PORTAGE_BIN_PATH, PRIVATE_PATH, \
- VDB_PATH
+from portage.const import MERGING_IDENTIFIER, EPREFIX, PRIVATE_PATH, VDB_PATH
from portage.dep import isvalidatom
import shutil
@@ -206,7 +205,8 @@ class MergesHandler(object):
emerge_cmd = (
portage._python_interpreter,
'-b',
- os.path.join(PORTAGE_BIN_PATH, 'emerge'),
+ os.path.join(EPREFIX or '/', 'usr', 'bin', 'emerge'),
+ '--ask',
'--quiet',
'--oneshot',
'--complete-graph=y'
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/emaint/modules/merges/
@ 2015-12-29 21:21 Brian Dolbec
0 siblings, 0 replies; 4+ messages in thread
From: Brian Dolbec @ 2015-12-29 21:21 UTC (permalink / raw
To: gentoo-commits
commit: bff7a405f648ee1fbaad46933558f31bcd3c15fa
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 29 21:14:13 2015 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Tue Dec 29 21:18:27 2015 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=bff7a405
emaint/.../merges: Rename --purge-tracker option due to bug 562652
Renaming the long option back to --purge, fixes it to work correctly.
Due to the structure of the plugin-system, it may need some re-wrok to handle hyphenated long options correctly.
X-Gentoo-Bug: 562652
X-Gentoo-Bug-url: https://bugs.gentoo.org/show_bug.cgi?id=562652
pym/portage/emaint/modules/merges/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pym/portage/emaint/modules/merges/__init__.py b/pym/portage/emaint/modules/merges/__init__.py
index bcb2ac8..211b7eb 100644
--- a/pym/portage/emaint/modules/merges/__init__.py
+++ b/pym/portage/emaint/modules/merges/__init__.py
@@ -16,7 +16,7 @@ module_spec = {
'functions': ['check', 'fix', 'purge'],
'func_desc': {
'purge': {
- 'short': '-P', 'long': '--purge-tracker',
+ 'short': '-P', 'long': '--purge',
'help': 'Removes the list of previously failed merges.' +
' WARNING: Only use this option if you plan on' +
' manually fixing them or do not want them'
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-12-29 21:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-04 20:16 [gentoo-commits] proj/portage:master commit in: pym/portage/emaint/modules/merges/ Brian Dolbec
2014-12-04 20:04 ` [gentoo-commits] proj/portage:plugin-sync " Brian Dolbec
-- strict thread matches above, loose matches on Subject: below --
2015-02-21 19:52 [gentoo-commits] proj/portage:master " Pavel Kazakov
2015-12-29 21:21 Brian Dolbec
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox