* [gentoo-commits] portage r15500 - in main/branches/prefix/pym/portage: . dbapi proxy
@ 2010-02-28 14:19 99% Fabian Groffen (grobian)
0 siblings, 0 replies; 1+ results
From: Fabian Groffen (grobian) @ 2010-02-28 14:19 UTC (permalink / raw
To: gentoo-commits
Author: grobian
Date: 2010-02-28 14:19:16 +0000 (Sun, 28 Feb 2010)
New Revision: 15500
Modified:
main/branches/prefix/pym/portage/__init__.py
main/branches/prefix/pym/portage/dbapi/bintree.py
main/branches/prefix/pym/portage/dbapi/porttree.py
main/branches/prefix/pym/portage/dbapi/vartree.py
main/branches/prefix/pym/portage/proxy/objectproxy.py
Log:
Merged from trunk -r15493:15497
| 15494 | Remove print() usage. |
| zmedico | |
| 15495 | Remove print() usage. |
| zmedico | |
| 15496 | Fix broken reference to portage._spawn_misc_sh(). Thanks to |
| zmedico | Arfrever for reporting. |
| 15497 | Add ObjectProxy __gt__, __ge__, __lt__, and __le__ methods |
| zmedico | to fix TypeError with python3 reported by Arfrever: File |
| | "/usr/lib/portage/pym/portage/__init__.py", line 513, in |
| | portageexit if secpass > 1 and os.environ.get("SANDBOX_ON") |
| | != "1": TypeError: unorderable types: _LazyImportFrom() > |
| | int() |
Modified: main/branches/prefix/pym/portage/__init__.py
===================================================================
--- main/branches/prefix/pym/portage/__init__.py 2010-02-28 14:18:21 UTC (rev 15499)
+++ main/branches/prefix/pym/portage/__init__.py 2010-02-28 14:19:16 UTC (rev 15500)
@@ -509,7 +509,7 @@
auxdbkeylen=len(auxdbkeys)
def portageexit():
- if secpass > 1 and os.environ.get("SANDBOX_ON") != "1":
+ if data.secpass > 1 and os.environ.get("SANDBOX_ON") != "1":
close_portdbapi_caches()
try:
mtimedb
Modified: main/branches/prefix/pym/portage/dbapi/bintree.py
===================================================================
--- main/branches/prefix/pym/portage/dbapi/bintree.py 2010-02-28 14:18:21 UTC (rev 15499)
+++ main/branches/prefix/pym/portage/dbapi/bintree.py 2010-02-28 14:19:16 UTC (rev 15500)
@@ -2,8 +2,6 @@
# Distributed under the terms of the GNU General Public License v2
# $Id$
-from __future__ import print_function
-
__all__ = ["bindbapi", "binarytree"]
import portage
@@ -868,7 +866,6 @@
mykey = portage.cpv_getkey(fullpkg)
try:
# invalid tbz2's can hurt things.
- #print "cpv_inject("+str(fullpkg)+")"
self.dbapi.cpv_inject(fullpkg)
remote_metadata = self.__remotepkgs[mypkg]
for k, v in remote_metadata.items():
@@ -885,7 +882,6 @@
remote_metadata.pop(k, None)
self._remotepkgs[fullpkg] = remote_metadata
- #print " -- Injected"
except SystemExit as e:
raise
except:
@@ -1151,7 +1147,6 @@
def gettbz2(self, pkgname):
"""Fetches the package from a remote site, if necessary. Attempts to
resume if the file appears to be partially downloaded."""
- print("Fetching '"+str(pkgname)+"'")
tbz2_path = self.getname(pkgname)
tbz2name = os.path.basename(tbz2_path)
resume = False
Modified: main/branches/prefix/pym/portage/dbapi/porttree.py
===================================================================
--- main/branches/prefix/pym/portage/dbapi/porttree.py 2010-02-28 14:18:21 UTC (rev 15499)
+++ main/branches/prefix/pym/portage/dbapi/porttree.py 2010-02-28 14:19:16 UTC (rev 15500)
@@ -2,8 +2,6 @@
# Distributed under the terms of the GNU General Public License v2
# $Id$
-from __future__ import print_function
-
__all__ = [
"close_portdbapi_caches", "FetchlistDict", "portagetree", "portdbapi"
]
@@ -809,8 +807,8 @@
checksums = mf.getDigests()
if not checksums:
if debug:
- print("[empty/missing/bad digest]: "+mypkg)
- return None
+ writemsg("[empty/missing/bad digest]: %s\n" % (mypkg,))
+ return {}
filesdict={}
myfiles = self.getFetchMap(mypkg, useflags=useflags)
#XXX: maybe this should be improved: take partial downloads
@@ -1091,8 +1089,8 @@
else:
myval = list(self._iter_match(mydep, self.cp_list(mykey)))
else:
- print("ERROR: xmatch doesn't handle", level, "query!")
- raise KeyError
+ raise AssertionError(
+ "Invalid level argument: '%s'" % level)
if self.frozen and (level not in ["match-list", "bestmatch-list"]):
self.xcache[level][mydep] = myval
Modified: main/branches/prefix/pym/portage/dbapi/vartree.py
===================================================================
--- main/branches/prefix/pym/portage/dbapi/vartree.py 2010-02-28 14:18:21 UTC (rev 15499)
+++ main/branches/prefix/pym/portage/dbapi/vartree.py 2010-02-28 14:19:16 UTC (rev 15500)
@@ -5391,7 +5391,7 @@
phase = 'die_hooks'
if self._scheduler is None:
- portage._spawn_misc_sh(self.settings, [phase],
+ _spawn_misc_sh(self.settings, [phase],
phase=phase)
else:
self._scheduler.dblinkEbuildPhase(
Modified: main/branches/prefix/pym/portage/proxy/objectproxy.py
===================================================================
--- main/branches/prefix/pym/portage/proxy/objectproxy.py 2010-02-28 14:18:21 UTC (rev 15499)
+++ main/branches/prefix/pym/portage/proxy/objectproxy.py 2010-02-28 14:19:16 UTC (rev 15500)
@@ -61,6 +61,18 @@
def __hash__(self):
return hash(object.__getattribute__(self, '_get_target')())
+ def __ge__(self, other):
+ return object.__getattribute__(self, '_get_target')() >= other
+
+ def __gt__(self, other):
+ return object.__getattribute__(self, '_get_target')() > other
+
+ def __le__(self, other):
+ return object.__getattribute__(self, '_get_target')() <= other
+
+ def __lt__(self, other):
+ return object.__getattribute__(self, '_get_target')() < other
+
def __eq__(self, other):
return object.__getattribute__(self, '_get_target')() == other
^ permalink raw reply [relevance 99%]
Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2010-02-28 14:19 99% [gentoo-commits] portage r15500 - in main/branches/prefix/pym/portage: . dbapi proxy Fabian Groffen (grobian)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox