summaryrefslogtreecommitdiffstats
path: root/pym/portage/dbapi/porttree.py
diff options
context:
space:
mode:
Diffstat (limited to 'pym/portage/dbapi/porttree.py')
-rw-r--r--pym/portage/dbapi/porttree.py37
1 files changed, 19 insertions, 18 deletions
diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py
index 3b160a2c4..0cdb36591 100644
--- a/pym/portage/dbapi/porttree.py
+++ b/pym/portage/dbapi/porttree.py
@@ -20,6 +20,7 @@ from portage.data import portage_gid, secpass
from portage.dbapi import dbapi
from portage.exception import PortageException, \
FileNotFound, InvalidDependString, InvalidPackageName
+from portage.localization import _
from portage.manifest import Manifest
from portage import eclass_cache, auxdbkeys, doebuild, flatten, \
@@ -208,9 +209,9 @@ class portdbapi(dbapi):
for alias in loc_repo_conf.aliases:
overridden_alias = repo_aliases.get(alias)
if overridden_alias is not None:
- writemsg_level(("!!! Alias '%s' " + \
- "created for '%s' overrides " + \
- "'%s' alias in " + \
+ writemsg_level(_("!!! Alias '%s' " \
+ "created for '%s' overrides " \
+ "'%s' alias in " \
"'%s'\n") % (alias, repo_name,
overridden_alias,
self.mysettings._local_repo_conf_path),
@@ -246,7 +247,7 @@ class portdbapi(dbapi):
master_name = repo_aliases.get(master_name, master_name)
master_path = self.treemap.get(master_name)
if master_path is None:
- writemsg_level(("Unavailable repository '%s' " + \
+ writemsg_level(_("Unavailable repository '%s' " \
"referenced by masters entry in '%s'\n") % \
(master_name, layout_filename),
level=logging.ERROR, noiselevel=-1)
@@ -269,8 +270,8 @@ class portdbapi(dbapi):
for other_name in loc_repo_conf.eclass_overrides:
other_path = self.treemap.get(other_name)
if other_path is None:
- writemsg_level(("Unavailable repository '%s' " + \
- "referenced by eclass-overrides entry in " + \
+ writemsg_level(_("Unavailable repository '%s' " \
+ "referenced by eclass-overrides entry in " \
"'%s'\n") % (other_name,
self.mysettings._local_repo_conf_path),
level=logging.ERROR, noiselevel=-1)
@@ -493,8 +494,8 @@ class portdbapi(dbapi):
st = os.stat(ebuild_path)
emtime = st[stat.ST_MTIME]
except OSError:
- writemsg("!!! aux_get(): ebuild for " + \
- "'%s' does not exist at:\n" % (cpv,), noiselevel=-1)
+ writemsg(_("!!! aux_get(): ebuild for " \
+ "'%s' does not exist at:\n") % (cpv,), noiselevel=-1)
writemsg("!!! %s\n" % ebuild_path, noiselevel=-1)
raise KeyError(cpv)
@@ -558,7 +559,7 @@ class portdbapi(dbapi):
myebuild, mylocation = self.findname2(mycpv, mytree)
if not myebuild:
- writemsg("!!! aux_get(): ebuild path for '%(cpv)s' not specified:\n" % {"cpv":mycpv},
+ writemsg(_("!!! aux_get(): ebuild path for '%s' not specified:\n") % mycpv,
noiselevel=1)
writemsg("!!! %s\n" % myebuild, noiselevel=1)
raise KeyError(mycpv)
@@ -566,7 +567,7 @@ class portdbapi(dbapi):
mydata, st, emtime = self._pull_valid_cache(mycpv, myebuild, mylocation)
doregen = mydata is None
- writemsg("auxdb is valid: "+str(not doregen)+" "+str(pkg)+"\n", 2)
+ writemsg(_("auxdb is valid: ")+str(not doregen)+" "+str(pkg)+"\n", 2)
if doregen:
if myebuild in self._broken_ebuilds:
@@ -574,7 +575,7 @@ class portdbapi(dbapi):
if not self._have_root_eclass_dir:
raise KeyError(mycpv)
writemsg("doregen: %s %s\n" % (doregen, mycpv), 2)
- writemsg("Generating cache entry(0) for: "+str(myebuild)+"\n", 1)
+ writemsg(_("Generating cache entry(0) for: ")+str(myebuild)+"\n", 1)
self.doebuild_settings.setcpv(mycpv)
mydata = {}
@@ -746,7 +747,7 @@ class portdbapi(dbapi):
for myfile in myfiles:
if myfile not in checksums:
if debug:
- writemsg("[bad digest]: missing %s for %s\n" % (myfile, mypkg))
+ writemsg(_("[bad digest]: missing %(file)s for %(pkg)s\n") % {"file":myfile, "pkg":mypkg})
continue
file_path = os.path.join(self.mysettings["DISTDIR"], myfile)
mystat = None
@@ -783,14 +784,14 @@ class portdbapi(dbapi):
for x in myfiles:
if not mysums or x not in mysums:
ok = False
- reason = "digest missing"
+ reason = _("digest missing")
else:
try:
ok, reason = portage.checksum.verify_all(
os.path.join(self.mysettings["DISTDIR"], x), mysums[x])
except FileNotFound, e:
ok = False
- reason = "File Not Found: '%s'" % str(e)
+ reason = _("File Not Found: '%s'") % str(e)
if not ok:
failures[x] = reason
if failures:
@@ -858,21 +859,21 @@ class portdbapi(dbapi):
if pf is not None:
ps = pkgsplit(pf)
if not ps:
- writemsg("\nInvalid ebuild name: %s\n" % \
+ writemsg(_("\nInvalid ebuild name: %s\n") % \
os.path.join(oroot, mycp, x), noiselevel=-1)
continue
if ps[0] != mysplit[1]:
- writemsg("\nInvalid ebuild name: %s\n" % \
+ writemsg(_("\nInvalid ebuild name: %s\n") % \
os.path.join(oroot, mycp, x), noiselevel=-1)
continue
ver_match = ver_regexp.match("-".join(ps[1:]))
if ver_match is None or not ver_match.groups():
- writemsg("\nInvalid ebuild version: %s\n" % \
+ writemsg(_("\nInvalid ebuild version: %s\n") % \
os.path.join(oroot, mycp, x), noiselevel=-1)
continue
d[mysplit[0]+"/"+pf] = None
if invalid_category and d:
- writemsg(("\n!!! '%s' has a category that is not listed in " + \
+ writemsg(_("\n!!! '%s' has a category that is not listed in " \
"%setc/portage/categories\n") % \
(mycp, self.mysettings["PORTAGE_CONFIGROOT"]), noiselevel=-1)
mylist = []