mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-09-13 14:13:13 +08:00
Ugly fix for uninstalling installed packages, but not uninstalling bundled packages.
This commit is contained in:
parent
c54957540b
commit
49c4f66d95
@ -239,10 +239,16 @@ class CuraPackageManager(QObject):
|
|||||||
Logger.log("i", "Attempt to remove package [%s] that is not installed, do nothing.", package_id)
|
Logger.log("i", "Attempt to remove package [%s] that is not installed, do nothing.", package_id)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
# Temp hack
|
||||||
|
if package_id not in self._installed_package_dict and package_id in self._bundled_package_dict:
|
||||||
|
Logger.log("i", "Not uninstalling [%s] because it is a bundled package.")
|
||||||
|
return
|
||||||
|
|
||||||
if package_id not in self._to_install_package_dict or force_add:
|
if package_id not in self._to_install_package_dict or force_add:
|
||||||
# Schedule for a delayed removal:
|
# Schedule for a delayed removal:
|
||||||
self._to_remove_package_set.add(package_id)
|
self._to_remove_package_set.add(package_id)
|
||||||
else:
|
else:
|
||||||
|
if package_id in self._to_install_package_dict:
|
||||||
# Remove from the delayed installation list if present
|
# Remove from the delayed installation list if present
|
||||||
del self._to_install_package_dict[package_id]
|
del self._to_install_package_dict[package_id]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user