mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-30 20:34:38 +01:00
Fix update repositories
This commit is contained in:
parent
e8b7af1ade
commit
4df616e6c6
1 changed files with 11 additions and 6 deletions
|
@ -649,19 +649,24 @@ class Update(object):
|
||||||
"""Update repositories lists
|
"""Update repositories lists
|
||||||
"""
|
"""
|
||||||
print("\nCheck and update repositories:\n")
|
print("\nCheck and update repositories:\n")
|
||||||
repositories = self.meta.repositories
|
enabled = self.meta.repositories
|
||||||
if only:
|
if only:
|
||||||
repositories = only
|
self.meta.repositories = only
|
||||||
try:
|
try:
|
||||||
for repo in repositories:
|
for repo in self.meta.repositories:
|
||||||
sys.stdout.write("{0}Update repository {1} ...{2}".format(
|
sys.stdout.write("{0}Update repository {1} ...{2}".format(
|
||||||
self.meta.color["GREY"], repo, self.meta.color["ENDC"]))
|
self.meta.color["GREY"], repo, self.meta.color["ENDC"]))
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
if repo in self.meta.default_repositories:
|
if repo in enabled:
|
||||||
exec("{0}.{1}()".format(self._init, repo))
|
exec("{0}.{1}()".format(self._init, repo))
|
||||||
sys.stdout.write(self.done)
|
sys.stdout.write(self.done)
|
||||||
elif repo in self.meta.repositories:
|
elif repo in self.meta.default_repositories:
|
||||||
Initialization(False).custom(repo)
|
try:
|
||||||
|
Initialization(False).custom(repo)
|
||||||
|
except:
|
||||||
|
sys.stdout.write(self.error)
|
||||||
|
print("")
|
||||||
|
sys.exit(0)
|
||||||
sys.stdout.write(self.done)
|
sys.stdout.write(self.done)
|
||||||
else:
|
else:
|
||||||
sys.stdout.write(self.error)
|
sys.stdout.write(self.error)
|
||||||
|
|
Loading…
Add table
Reference in a new issue