fosskers / aura

A multilingual package manager for Arch Linux and the AUR.
https://fosskers.github.io/aura/
GNU General Public License v3.0
1.73k stars 112 forks source link

Local pkgs compared to AUR states #694

Closed leshow closed 1 month ago

leshow commented 3 years ago

So looking at the output of yay and aura -O, they produce different results.

yay also delineates between "missing" and "orphaned". Here's the output of aura -O on my machine:

~
❯ sudo aura -Oj                     
python2-beautifulsoup4
python2-cssselect
python2-pycryptodome
~
❯ 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'd like to figure out what exactly yay is showing compared to what aura considers "orphaned" because there is obviously some differences there. Is it just that aura only displays orphaned packages without taking into account the AUR?

Additionally, I think it would be nice to have some commands to show this extra information (out of date, missing, etc) in a forwards-compatible way. If you're into that, perhaps you can give me your thoughts and I can take a stab at it later.

edit: okay, so aura considers an "orphan" to be a "package marked as a dependency, yet required by no other package". Aura runs pacman -Qqdt for this, but I don't think that output includes AUR packages.

On the other hand yay's queries the AUR with a list of packages in an RPC request here and counts the package as missing if it's not present in the AUR, counts as orphaned if it has an empty maintainer field, and out of date if it's been flagged out of date.

I think there's some room here to do a similar RPC request to pull this sort of information in aura, it can be useful to know at a glance what the state is of your packages compared to the AUR.

fosskers commented 3 years ago

You're right that Aura hasn't ever accounted for what's currently in the AUR when checking for Orphans. It's local definition of orphan is what you've stated: a package that has been "left behind" by a parent package that no longer needs it / is no longer installed.

Am I right that Yay's definition is the AUR's definition: a package who no longer has a maintainer?

leshow commented 3 years ago

Yeah, so to summarize: yay:

aura:

Without changing aura's definition of "orphan" I think it would be nice to list missing/flagged/no maintainer pkgs in aura. What do you think?

fosskers commented 3 years ago

I like the idea. It could potentially live under aura check (a new feature of the Rust port), although that's more for verifying your system setup as a whole. Perhaps instead a separate subflag under -A? Or part of -u before installation proceeds?

And as a side note, I believe the definition of orphan that Aura uses is the same as used by the Pacman devs themselves.

leshow commented 3 years ago

Are you accepting PRs for the rust code at the moment? I was looking through it and had some changes, but it looks like it's on your personal remote

fosskers commented 3 years ago

Yes I am, so long as the changes are minimal. I still have a massive TODO list on my own end, and things are likely to change.

So I'd say PRs like "hey you should do X this way instead" we can avoid for now, since I either already know the problem or expect it to change anyway.

If the PR is "hey I see you've finished a subsection of the port (say the recent -C command) and I'd like to add a flag" then go right ahead :+1:

fosskers commented 1 month ago

Hi there, it's been a while. I'm very close to the Aura 4 release, and I'm going back through old issues. I'm going to close this for now, but please let me know if you have any other issues or ideas. Cheers!