Skip to content

Fixed: package manager update bugs#92

Merged
gvatsal60 merged 12 commits intomasterfrom
fix/pkg_update_bugs
Sep 21, 2025
Merged

Fixed: package manager update bugs#92
gvatsal60 merged 12 commits intomasterfrom
fix/pkg_update_bugs

Conversation

@gvatsal60
Copy link
Owner

This pull request refactors and improves the robustness of the .update.sh script's package and cache management logic. The main focus is on simplifying conditional logic, improving error handling, and making cache cleanup more reliable across different Linux distributions.

Improvements to Snap cache cleanup:

  • The cleanup_snapd() function now checks if the Snap cache directory exists before attempting to clean it, and provides informative messages on success or failure. This prevents errors if the directory is missing and gives clearer feedback during cleanup.

Refactoring and simplification of package update logic:

  • Removed unnecessary checks for empty cache directories before running package manager update commands for Debian, Alpine, and Arch, ensuring updates always run and simplifying the logic. [1] [2]
  • For RHEL-based systems, consolidated and improved error handling by running makecache or check-update unconditionally and reporting errors immediately, rather than relying on indirect checks or exit codes.
  • Standardized and clarified update messages and error handling across all supported distributions for better maintainability and user feedback. [1] [2]

@gvatsal60 gvatsal60 self-assigned this Sep 21, 2025
Copilot AI review requested due to automatic review settings September 21, 2025 05:41
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the .update.sh script to improve robustness and error handling in package manager update logic. The changes focus on simplifying conditional logic by removing unnecessary cache directory checks and enhancing Snap cache cleanup functionality.

  • Improved Snap cache cleanup with proper directory existence checks and error handling
  • Removed unnecessary cache directory checks before running package manager updates
  • Consolidated error handling for RHEL-based systems with immediate error reporting

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 21, 2025 05:48
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 21, 2025 05:49
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@gvatsal60 gvatsal60 requested a review from Copilot September 21, 2025 05:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 21, 2025 05:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 21, 2025 06:01
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 21, 2025 06:05
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 21, 2025 06:08
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@gvatsal60 gvatsal60 requested a review from Copilot September 21, 2025 06:21
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@gvatsal60 gvatsal60 merged commit b52b157 into master Sep 21, 2025
8 checks passed
@gvatsal60 gvatsal60 deleted the fix/pkg_update_bugs branch September 21, 2025 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant