Browse Source

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

Изменено сообещние обновления утилит.
master3.3
Mike khiretskiy 8 years ago
parent
commit
ccb059853e
  1. 15
      update/update.py
  2. 3
      update/utils/cl_update.py

15
update/update.py

@ -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):

3
update/utils/cl_update.py

@ -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