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