mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 00:04:15 +02:00
[snap] fix -> not updating the table with the installed runtimes after a first Snap installation
This commit is contained in:
@@ -85,6 +85,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
- not able to install classic Snaps due to Ubuntu's old Snaps API shutdown
|
||||
- some environment variables are not available during the common operations (install, upgrade, downgrade, uninstall, launch)
|
||||
- refresh app action: not returning an error when there is no update available
|
||||
- not updating the table with the installed runtimes after a first Snap installation
|
||||
- Web
|
||||
- some environment variable are not available during the launch process
|
||||
- UI
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import re
|
||||
import time
|
||||
import traceback
|
||||
from threading import Thread
|
||||
from typing import List, Set, Type, Optional
|
||||
|
||||
@@ -205,16 +206,16 @@ class SnapManager(SoftwareManager):
|
||||
if success:
|
||||
new_installed = [pkg]
|
||||
|
||||
if installed:
|
||||
try:
|
||||
current_installed = self.read_installed(disk_loader=disk_loader, internet_available=internet.is_available()).installed
|
||||
except:
|
||||
current_installed = None
|
||||
try:
|
||||
current_installed = self.read_installed(disk_loader=disk_loader, internet_available=internet.is_available()).installed
|
||||
except:
|
||||
traceback.print_exc()
|
||||
current_installed = None
|
||||
|
||||
if current_installed and (not installed or len(current_installed) > len(installed) + 1):
|
||||
for p in current_installed:
|
||||
if p.name != pkg.name and (not installed or p.name not in installed):
|
||||
new_installed.append(p)
|
||||
if current_installed:
|
||||
for p in current_installed:
|
||||
if p.name != pkg.name and (not installed or p.name not in installed):
|
||||
new_installed.append(p)
|
||||
|
||||
return TransactionResult(success=success, installed=new_installed, removed=[])
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user