Simplify the backend of update-station to match pkg new behavior#61
Closed
Simplify the backend of update-station to match pkg new behavior#61
Conversation
Now that pkg has a better support for upgrading packages with base. I have cleanup the code that was forcing reinstall, replace pkg-static by pkg. this should take care of the loop issue. Also took time to clean some deprecated GTK code.
Contributor
Reviewer's Guide by SourceryThis pull request simplifies the backend of the update-station to align with the new behavior of pkg, which now handles upgrades with base more effectively. This change removes the need to force re-installation of packages and replaces pkg-static with pkg. Additionally, some deprecated GTK code was cleaned up. Sequence diagram for simplified package update processsequenceDiagram
participant User
participant UpdateStation
participant pkg
User->>UpdateStation: Check for updates
UpdateStation->>pkg: update local pkg database
pkg-->>UpdateStation: database updated
UpdateStation->>pkg: pkg upgrade -n
pkg-->>UpdateStation: list of packages to update
UpdateStation->>User: Show update dialog
User->>UpdateStation: Confirm update
UpdateStation->>pkg: pkg upgrade -Fy
pkg-->>UpdateStation: packages downloaded
UpdateStation->>pkg: pkg upgrade -y
pkg-->>UpdateStation: packages installed
UpdateStation->>User: Update complete
Class diagram showing changes to Data classclassDiagram
class Data {
+str current_abi
+bool do_not_upgrade
+str home
-bool kernel_upgrade
+bool major_upgrade
+str new_abi
+dict packages_dictionary
+bool second_update
+bool stop_pkg_refreshing
+object system_tray
-int total_packages
+bool update_started
+str username
+bool system_upgrade
}
note for Data "Removed: kernel_upgrade, total_packages
Added: system_upgrade"
Class diagram showing changes to package upgrade data structureclassDiagram
class PackageUpgradeData {
+bool system_upgrade
+list remove
+int number_to_remove
+list upgrade
+int number_to_upgrade
+list install
+int number_to_install
+list reinstall
+int number_to_reinstall
+int total_of_packages
}
note for PackageUpgradeData "Added count fields and
total_of_packages for better
tracking of package operations"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey @ericbsd - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Now that pkg has a better support for upgrading packages with base. I have cleanup the code that was forcing reinstall, replace pkg-static by pkg. this should take care of the loop issue.
Also took time to clean some deprecated GTK code.
Summary by Sourcery
Update the backend to use
pkginstead ofpkg-staticfor package management. This simplifies the upgrade process and resolves a loop issue. Also, remove some deprecated GTK code.Bug Fixes:
Enhancements:
pkg-statictopkgfor package management