Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📃 fix(system-cleanup): pacman orphan package removal #744

Merged

Conversation

adamperkowski
Copy link
Collaborator

@adamperkowski adamperkowski commented Oct 2, 2024

Type of Change]

  • Bug fix
  • Hotfix

Description

As you can see below, the script fails because:

  1. Command structure for package removal is wrong
  2. -R returns 1 when there are no packages provided

All fixed here
Redirecting the output to /dev/null so the script's output doesn't get flooded.

Testing

Works :)

Issues / other PRs related

Additional Information

image

Checklist

  • My code adheres to the coding and style guidelines of the project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • My changes generate no errors/warnings/merge conflicts.

(📃 is a shell script btw)

@adamperkowski adamperkowski force-pushed the pacman_orphans_removal_fix branch from d098420 to a911fe1 Compare October 2, 2024 22:14
@@ -23,7 +23,8 @@ cleanup_system() {
;;
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -Sc --noconfirm
"$ESCALATION_TOOL" "$PACKAGER" -Rns "$(pacman -Qtdq)" --noconfirm
# -Rns will return 1 if there are no packages provided
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# -Rns will return 1 if there are no packages provided

@nnyyxxxx
Copy link
Contributor

nnyyxxxx commented Oct 3, 2024

ah i see the issue
image
the issue is with the quoting, what you're doing here is completely unnecessary, just remove the quotes and then send the output to null

@adamperkowski adamperkowski force-pushed the pacman_orphans_removal_fix branch from 24c6aa9 to 2f4f703 Compare October 3, 2024 10:13
Copy link
Contributor

@nnyyxxxx nnyyxxxx left a comment

Choose a reason for hiding this comment

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

awesome

@adamperkowski adamperkowski changed the title fix(system-cleanup): pacman orphan package removal 📃 fix(system-cleanup): pacman orphan package removal Oct 3, 2024
@ChrisTitusTech ChrisTitusTech merged commit c45b0dc into ChrisTitusTech:main Oct 8, 2024
2 checks passed
@adamperkowski adamperkowski deleted the pacman_orphans_removal_fix branch October 8, 2024 22:41
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.

system cleanup wont work
3 participants