mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-12-29 10:26:12 +01:00
Updated for update repos
This commit is contained in:
parent
12ee3ad43c
commit
db93d14966
1 changed files with 6 additions and 7 deletions
|
@ -31,7 +31,6 @@ class UpdateRepository(Configs):
|
|||
self.progress = ProgressBar()
|
||||
self.utils = Utilities()
|
||||
self.data = InstallData()
|
||||
|
||||
self.check_updates = CheckUpdates(flags, repository)
|
||||
|
||||
self.repos_for_update: dict = {}
|
||||
|
@ -625,10 +624,8 @@ class UpdateRepository(Configs):
|
|||
}
|
||||
|
||||
with open(Path(path, sbo_txt), 'w') as sbo:
|
||||
|
||||
for p in path.glob('**/*'):
|
||||
if p.name.endswith('.info'):
|
||||
|
||||
sbo_path = Path('/'.join(str(p).split('/')[:-1]))
|
||||
|
||||
name: str = str(p).split('/')[-2]
|
||||
|
@ -710,9 +707,13 @@ class UpdateRepository(Configs):
|
|||
|
||||
return info[begin:end]
|
||||
|
||||
def check(self, queue) -> None:
|
||||
def check_for_updates(self, queue) -> None:
|
||||
compare: dict = self.check_updates.check_the_repositories()
|
||||
self.print_the_messages(compare)
|
||||
|
||||
return queue.put(compare)
|
||||
|
||||
def print_the_messages(self, compare: dict) -> None:
|
||||
print()
|
||||
for repo, comp in compare.items():
|
||||
if comp:
|
||||
|
@ -723,14 +724,12 @@ class UpdateRepository(Configs):
|
|||
print(f'\n{self.endc}{self.yellow}No changes in ChangeLog.txt between your '
|
||||
f'last update and now.{self.endc}')
|
||||
|
||||
return queue.put(compare)
|
||||
|
||||
def repositories(self) -> None:
|
||||
queue = Queue()
|
||||
message = f'Checking for news, please wait...'
|
||||
|
||||
# Starting multiprocessing
|
||||
p1 = Process(target=self.check, args=(queue,))
|
||||
p1 = Process(target=self.check_for_updates, args=(queue,))
|
||||
p2 = Process(target=self.progress.bar, args=(message, ''))
|
||||
|
||||
p1.start()
|
||||
|
|
Loading…
Reference in a new issue