Browse Source

Исправлено повторное скачиваение дистрибутива.

Изменено сообещние обновления утилит.
tags/3.2.0_alpha6
Mike khiretskiy 7 years ago
parent
commit
ccb059853e
2 changed files with 12 additions and 6 deletions
  1. +11
    -4
      update/update.py
  2. +1
    -2
      update/utils/cl_update.py

+ 11
- 4
update/update.py View File

@@ -16,6 +16,7 @@

import sys
from os import path
import os

from calculate.lib.utils.tools import AddonError
from calculate.lib.utils.colortext.palette import TextState
@@ -124,15 +125,21 @@ class Update:
if e.addon:
self.printWARNING(str(e.addon))
self.printWARNING(str(e))
self.printWARNING(_("Re-fetch {name} repository"
).format(name=repname))
self.printWARNING(
_("Re-fetch {name} repository").format(name=repname))
try:
rpath_new = "%s_new" % rpath
self._syncRepository(repname, url, rpath_new, revision,
branch)
removeDir(rpath)
except OSError as e:
os.rename(rpath_new, rpath)
except OSError:
raise UpdateError(_("Permission denied to change "
"{repname} repository").format(
repname=repname))
self._syncRepository(repname, url, rpath, revision, branch)
else:
if not self._syncRepository(repname, url, rpath, revision, branch):
return "skip"
return True

def syncLaymanRepository(self, repname):


+ 1
- 2
update/utils/cl_update.py View File

@@ -133,8 +133,7 @@ class ClUpdateAction(Action):
'group': __("Updating Calculate Utilities"),
'tasks': [
{'name': 'update:update_calculate_pkgs',
'message': __("Updating {0}").format(
pkg_color("sys-apps/calculate-utilities")),
'message': __("Calculating dependencies"),
'method': 'Update.emerge("-u","sys-apps/calculate-utilities")',
'condition': need_upgrade('sys-apps/calculate-utilities$')
},


Loading…
Cancel
Save