|
|
|
@ -25,7 +25,6 @@ from calculate.lib.utils.tools import AddonError
|
|
|
|
|
from calculate.lib.utils.colortext.palette import TextState
|
|
|
|
|
from calculate.lib.utils.colortext import get_color_print
|
|
|
|
|
from calculate.update.emerge_parser import RevdepPercentBlock
|
|
|
|
|
import pexpect
|
|
|
|
|
|
|
|
|
|
from package_tools import Git, Layman,\
|
|
|
|
|
EmergeLogNamedTask, EmergeLog, GitError, \
|
|
|
|
@ -134,7 +133,8 @@ class Update:
|
|
|
|
|
"cl_update_rep_rev", "cl_update_branch_name"],
|
|
|
|
|
where="cl_update_rep_name", eq=repname, limit=1))
|
|
|
|
|
if not url or not rpath:
|
|
|
|
|
raise UpdateError(_("Repositories variables is not configured"))
|
|
|
|
|
raise UpdateError(_("Variables with repositories settings "
|
|
|
|
|
"is not configured"))
|
|
|
|
|
self.addProgress()
|
|
|
|
|
if clean_on_error:
|
|
|
|
|
try:
|
|
|
|
@ -160,6 +160,9 @@ class Update:
|
|
|
|
|
raise UpdateError(_("Permission denied to change "
|
|
|
|
|
"{repname} repository").format(
|
|
|
|
|
repname=repname))
|
|
|
|
|
finally:
|
|
|
|
|
if path.exists(rpath_new):
|
|
|
|
|
removeDir(rpath_new)
|
|
|
|
|
else:
|
|
|
|
|
if not self._syncRepository(repname, url, rpath, revision, branch):
|
|
|
|
|
return "skip"
|
|
|
|
@ -292,7 +295,9 @@ class Update:
|
|
|
|
|
else:
|
|
|
|
|
_print = _print.foreground(Colors.GREEN)
|
|
|
|
|
|
|
|
|
|
self.startTask(_("Emerging%s %s") % (part, _print(str(pkg))))
|
|
|
|
|
self.startTask(
|
|
|
|
|
_("Emerging{part} {package}").format(part=part,
|
|
|
|
|
package=_print(str(pkg))))
|
|
|
|
|
|
|
|
|
|
def _printInstallPackage(self, pkg, binary=False):
|
|
|
|
|
"""
|
|
|
|
@ -316,12 +321,15 @@ class Update:
|
|
|
|
|
if max_num > 1:
|
|
|
|
|
one = _print.foreground(Colors.YELLOW).bold("{0}", num)
|
|
|
|
|
two = _print.foreground(Colors.YELLOW).bold("{0}", max_num)
|
|
|
|
|
part = " (%s of %s)" % (one, two)
|
|
|
|
|
part = _(" ({current} of {maximum})").format(current=one,
|
|
|
|
|
maximum=two)
|
|
|
|
|
else:
|
|
|
|
|
part = ""
|
|
|
|
|
_print = _print.foreground(Colors.RED)
|
|
|
|
|
|
|
|
|
|
self.startTask(_("Unmerging%s %s") % (part, _print.bold(str(pkg))))
|
|
|
|
|
self.startTask(
|
|
|
|
|
_("Unmerging{part} {package}").format(part=part,
|
|
|
|
|
package=_print.bold(str(pkg))))
|
|
|
|
|
|
|
|
|
|
def emergelike(self, cmd, *params):
|
|
|
|
|
"""
|
|
|
|
|