mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-08 13:14:17 +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
|
- 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)
|
- 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
|
- 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
|
- Web
|
||||||
- some environment variable are not available during the launch process
|
- some environment variable are not available during the launch process
|
||||||
- UI
|
- UI
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import re
|
import re
|
||||||
import time
|
import time
|
||||||
|
import traceback
|
||||||
from threading import Thread
|
from threading import Thread
|
||||||
from typing import List, Set, Type, Optional
|
from typing import List, Set, Type, Optional
|
||||||
|
|
||||||
@@ -205,16 +206,16 @@ class SnapManager(SoftwareManager):
|
|||||||
if success:
|
if success:
|
||||||
new_installed = [pkg]
|
new_installed = [pkg]
|
||||||
|
|
||||||
if installed:
|
try:
|
||||||
try:
|
current_installed = self.read_installed(disk_loader=disk_loader, internet_available=internet.is_available()).installed
|
||||||
current_installed = self.read_installed(disk_loader=disk_loader, internet_available=internet.is_available()).installed
|
except:
|
||||||
except:
|
traceback.print_exc()
|
||||||
current_installed = None
|
current_installed = None
|
||||||
|
|
||||||
if current_installed and (not installed or len(current_installed) > len(installed) + 1):
|
if current_installed:
|
||||||
for p in current_installed:
|
for p in current_installed:
|
||||||
if p.name != pkg.name and (not installed or p.name not in installed):
|
if p.name != pkg.name and (not installed or p.name not in installed):
|
||||||
new_installed.append(p)
|
new_installed.append(p)
|
||||||
|
|
||||||
return TransactionResult(success=success, installed=new_installed, removed=[])
|
return TransactionResult(success=success, installed=new_installed, removed=[])
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user