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

[aura] -Cv: Cache clear vcs contents #693

Merged
merged 2 commits into from
Feb 27, 2021

Conversation

leshow
Copy link
Contributor

@leshow leshow commented Feb 12, 2021

closes: #692

I can submit changes for the Rust version in another PR. I re-used the "Cleaning package cache..." translations, if we want that to be more specific we'll need a new set of translations.

I haven't tested it out yet, although the code is pretty straight forward, what's a good way to test? Do you just stack build then execute the binary?

@fosskers
Copy link
Owner

fosskers commented Feb 12, 2021

Personally I often stack install and then just run aura as-is from the command line for both testing and regular use.

@leshow
Copy link
Contributor Author

leshow commented Feb 13, 2021

Okay, I've built and tried it. Successfully cleared out my vcs dir. I haven't gotten a chance to write Haskell in a while, this was fun. Let me know if it looks good on your end.

edit: while I've got you here, some tools like yay have the ability to tell you which of your set of AUR packages no longer has a corresponding entry in aur.archlinux.org. I think something like like could be useful for aura. What do you think? yay can also list missing/orphaned packages. It lists them every time you run a command which I don't really like but it may be nice to have a subcommand for aura that lists these sorts of things.

@fosskers
Copy link
Owner

Thanks! I'll get this merged tomorrow (Sunday).

@fosskers
Copy link
Owner

Aura does have -O for operations involving orphans. Is what -Oj does differ from yay's behaviour?

@leshow
Copy link
Contributor Author

leshow commented Feb 13, 2021

Interestingly the output is different than what aura produces, it also delineates between "missing" and "orphaned". I've used aura for years and know about -Oj but the results are different:

~
❯ sudo aura -Oj                     
checking dependencies...

Packages (5) python2-backports.functools_lru_cache-1.6.1-2  python2-soupsieve-1.9.6-2  python2-beautifulsoup4-4.9.3-3  python2-cssselect-1.1.0-6  python2-pycryptodome-3.10.1-1

Total Removed Size:  5.62 MiB

:: Do you want to remove these packages? [Y/n] n
~
❯ yay
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
 valveaur is up to date
:: Starting full system upgrade...
warning: arm-none-eabi-gcc: ignoring package upgrade (8.3.0-1 => 10.2.0-1)
warning: avr-gcc: ignoring package upgrade (8.3.0-1 => 10.2.0-1)
 there is nothing to do
:: Searching databases for updates...
:: Searching AUR for updates...
 -> Missing AUR Packages:  jdownloader  nodejs-webtorrent-cli  zukitwo-themes
 -> Orphaned AUR Packages:  polybar-spotify-git
 -> Flagged Out Of Date AUR Packages:  abgx360  abgx360gui  artwiz-fonts  bs-platform  nitrux-icon-theme  rxvt-unicode-patched  spotify  terminus-font-ttf  usb-creator  wxgtk2.8
 there is nothing to do

I can make a separate issue for this if you want, I'd like to know exactly what each considers an "orphan"

@fosskers
Copy link
Owner

Sure, please do.

@leshow
Copy link
Contributor Author

leshow commented Feb 24, 2021

This PR is good to go? Or did you want me to make the changes to the Rust code here also.

@fosskers
Copy link
Owner

Forgive me, this should be good to go. I will test and merge it on Friday.

Copy link
Owner

@fosskers fosskers left a comment

Choose a reason for hiding this comment

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

The changes themselves look good, testing now.

@fosskers fosskers merged commit 02dfad0 into fosskers:master Feb 27, 2021
@fosskers
Copy link
Owner

Works great, thank you. Making a release.

@fosskers
Copy link
Owner

Released, enjoy.

@ratijas
Copy link
Contributor

ratijas commented Feb 28, 2021

Unfortunately, can't upvote or add an emoji reaction to a release. GitHub why 😆

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.

clear /var/cache/aura
3 participants